ccxt 4.2.48__py2.py3-none-any.whl → 4.2.49__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/bitstamp.py +8 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +6 -3
- ccxt/async_support/bitmart.py +24 -2
- ccxt/async_support/bitstamp.py +8 -0
- ccxt/async_support/btcalpha.py +4 -0
- ccxt/async_support/btcmarkets.py +4 -0
- ccxt/async_support/btcturk.py +4 -0
- ccxt/async_support/bybit.py +132 -6
- ccxt/async_support/independentreserve.py +47 -1
- ccxt/async_support/latoken.py +16 -0
- ccxt/async_support/luno.py +18 -0
- ccxt/async_support/lykke.py +19 -0
- ccxt/async_support/ndax.py +18 -0
- ccxt/async_support/upbit.py +8 -1
- ccxt/base/exchange.py +2 -2
- ccxt/binance.py +6 -3
- ccxt/bitmart.py +24 -2
- ccxt/bitstamp.py +8 -0
- ccxt/btcalpha.py +4 -0
- ccxt/btcmarkets.py +4 -0
- ccxt/btcturk.py +4 -0
- ccxt/bybit.py +132 -6
- ccxt/independentreserve.py +47 -1
- ccxt/latoken.py +16 -0
- ccxt/luno.py +18 -0
- ccxt/lykke.py +19 -0
- ccxt/ndax.py +18 -0
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/ascendex.py +19 -7
- ccxt/pro/bitget.py +24 -7
- ccxt/pro/bitstamp.py +1 -1
- ccxt/pro/mexc.py +2 -1
- ccxt/test/test_async.py +10 -10
- ccxt/test/test_sync.py +10 -10
- ccxt/upbit.py +8 -1
- {ccxt-4.2.48.dist-info → ccxt-4.2.49.dist-info}/METADATA +4 -4
- {ccxt-4.2.48.dist-info → ccxt-4.2.49.dist-info}/RECORD +42 -42
- {ccxt-4.2.48.dist-info → ccxt-4.2.49.dist-info}/WHEEL +0 -0
- {ccxt-4.2.48.dist-info → ccxt-4.2.49.dist-info}/top_level.txt +0 -0
ccxt/bybit.py
CHANGED
@@ -95,6 +95,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
95
95
|
'fetchMarketLeverageTiers': True,
|
96
96
|
'fetchMarkets': True,
|
97
97
|
'fetchMarkOHLCV': True,
|
98
|
+
'fetchMyLiquidations': True,
|
98
99
|
'fetchMySettlementHistory': True,
|
99
100
|
'fetchMyTrades': True,
|
100
101
|
'fetchOHLCV': True,
|
@@ -4262,7 +4263,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4262
4263
|
paginate = False
|
4263
4264
|
paginate, params = self.handle_option_and_params(params, 'fetchOrders', 'paginate')
|
4264
4265
|
if paginate:
|
4265
|
-
return self.fetch_paginated_call_cursor('fetchOrders', symbol, since, limit, params, 'nextPageCursor', '
|
4266
|
+
return self.fetch_paginated_call_cursor('fetchOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
|
4266
4267
|
enableUnifiedMargin, enableUnifiedAccount = self.is_unified_enabled()
|
4267
4268
|
isUnifiedAccount = (enableUnifiedMargin or enableUnifiedAccount)
|
4268
4269
|
request = {}
|
@@ -4422,7 +4423,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4422
4423
|
paginate = False
|
4423
4424
|
paginate, params = self.handle_option_and_params(params, 'fetchCanceledAndClosedOrders', 'paginate')
|
4424
4425
|
if paginate:
|
4425
|
-
return self.fetch_paginated_call_cursor('fetchCanceledAndClosedOrders', symbol, since, limit, params, 'nextPageCursor', '
|
4426
|
+
return self.fetch_paginated_call_cursor('fetchCanceledAndClosedOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
|
4426
4427
|
enableUnifiedMargin, enableUnifiedAccount = self.is_unified_enabled()
|
4427
4428
|
isUnifiedAccount = (enableUnifiedMargin or enableUnifiedAccount)
|
4428
4429
|
request = {}
|
@@ -4766,7 +4767,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4766
4767
|
paginate = False
|
4767
4768
|
paginate, params = self.handle_option_and_params(params, 'fetchMyTrades', 'paginate')
|
4768
4769
|
if paginate:
|
4769
|
-
return self.fetch_paginated_call_cursor('fetchMyTrades', symbol, since, limit, params, 'nextPageCursor', '
|
4770
|
+
return self.fetch_paginated_call_cursor('fetchMyTrades', symbol, since, limit, params, 'nextPageCursor', 'cursor', None, 100)
|
4770
4771
|
enableUnifiedMargin, enableUnifiedAccount = self.is_unified_enabled()
|
4771
4772
|
isUnifiedAccount = (enableUnifiedMargin or enableUnifiedAccount)
|
4772
4773
|
request = {}
|
@@ -4956,7 +4957,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
4956
4957
|
paginate = False
|
4957
4958
|
paginate, params = self.handle_option_and_params(params, 'fetchDeposits', 'paginate')
|
4958
4959
|
if paginate:
|
4959
|
-
return self.fetch_paginated_call_cursor('fetchDeposits', code, since, limit, params, 'nextPageCursor', '
|
4960
|
+
return self.fetch_paginated_call_cursor('fetchDeposits', code, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
|
4960
4961
|
request = {
|
4961
4962
|
# 'coin': currency['id'],
|
4962
4963
|
# 'limit': 20, # max 50
|
@@ -5018,7 +5019,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5018
5019
|
paginate = False
|
5019
5020
|
paginate, params = self.handle_option_and_params(params, 'fetchWithdrawals', 'paginate')
|
5020
5021
|
if paginate:
|
5021
|
-
return self.fetch_paginated_call_cursor('fetchWithdrawals', code, since, limit, params, 'nextPageCursor', '
|
5022
|
+
return self.fetch_paginated_call_cursor('fetchWithdrawals', code, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
|
5022
5023
|
request = {
|
5023
5024
|
# 'coin': currency['id'],
|
5024
5025
|
# 'limit': 20, # max 50
|
@@ -6419,7 +6420,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
6419
6420
|
paginate = False
|
6420
6421
|
paginate, params = self.handle_option_and_params(params, 'fetchTransfers', 'paginate')
|
6421
6422
|
if paginate:
|
6422
|
-
return self.fetch_paginated_call_cursor('fetchTransfers', code, since, limit, params, 'nextPageCursor', '
|
6423
|
+
return self.fetch_paginated_call_cursor('fetchTransfers', code, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
|
6423
6424
|
currency = None
|
6424
6425
|
request = {}
|
6425
6426
|
if code is not None:
|
@@ -7212,6 +7213,131 @@ class bybit(Exchange, ImplicitAPI):
|
|
7212
7213
|
'info': greeks,
|
7213
7214
|
}
|
7214
7215
|
|
7216
|
+
def fetch_my_liquidations(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
7217
|
+
"""
|
7218
|
+
retrieves the users liquidated positions
|
7219
|
+
:see: https://bybit-exchange.github.io/docs/api-explorer/v5/position/execution
|
7220
|
+
:param str [symbol]: unified CCXT market symbol
|
7221
|
+
:param int [since]: the earliest time in ms to fetch liquidations for
|
7222
|
+
:param int [limit]: the maximum number of liquidation structures to retrieve
|
7223
|
+
:param dict [params]: exchange specific parameters for the exchange API endpoint
|
7224
|
+
:param str [params.type]: market type, ['swap', 'option', 'spot']
|
7225
|
+
:param str [params.subType]: market subType, ['linear', 'inverse']
|
7226
|
+
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
7227
|
+
:returns dict: an array of `liquidation structures <https://docs.ccxt.com/#/?id=liquidation-structure>`
|
7228
|
+
"""
|
7229
|
+
self.load_markets()
|
7230
|
+
paginate = False
|
7231
|
+
paginate, params = self.handle_option_and_params(params, 'fetchMyLiquidations', 'paginate')
|
7232
|
+
if paginate:
|
7233
|
+
return self.fetch_paginated_call_cursor('fetchMyLiquidations', symbol, since, limit, params, 'nextPageCursor', 'cursor', None, 100)
|
7234
|
+
request = {
|
7235
|
+
'execType': 'BustTrade',
|
7236
|
+
}
|
7237
|
+
market = None
|
7238
|
+
if symbol is not None:
|
7239
|
+
market = self.market(symbol)
|
7240
|
+
request['symbol'] = market['id']
|
7241
|
+
type = None
|
7242
|
+
type, params = self.get_bybit_type('fetchMyLiquidations', market, params)
|
7243
|
+
request['category'] = type
|
7244
|
+
if limit is not None:
|
7245
|
+
request['limit'] = limit
|
7246
|
+
if since is not None:
|
7247
|
+
request['startTime'] = since
|
7248
|
+
request, params = self.handle_until_option('endTime', request, params)
|
7249
|
+
response = self.privateGetV5ExecutionList(self.extend(request, params))
|
7250
|
+
#
|
7251
|
+
# {
|
7252
|
+
# "retCode": 0,
|
7253
|
+
# "retMsg": "OK",
|
7254
|
+
# "result": {
|
7255
|
+
# "nextPageCursor": "132766%3A2%2C132766%3A2",
|
7256
|
+
# "category": "linear",
|
7257
|
+
# "list": [
|
7258
|
+
# {
|
7259
|
+
# "symbol": "ETHPERP",
|
7260
|
+
# "orderType": "Market",
|
7261
|
+
# "underlyingPrice": "",
|
7262
|
+
# "orderLinkId": "",
|
7263
|
+
# "side": "Buy",
|
7264
|
+
# "indexPrice": "",
|
7265
|
+
# "orderId": "8c065341-7b52-4ca9-ac2c-37e31ac55c94",
|
7266
|
+
# "stopOrderType": "UNKNOWN",
|
7267
|
+
# "leavesQty": "0",
|
7268
|
+
# "execTime": "1672282722429",
|
7269
|
+
# "isMaker": False,
|
7270
|
+
# "execFee": "0.071409",
|
7271
|
+
# "feeRate": "0.0006",
|
7272
|
+
# "execId": "e0cbe81d-0f18-5866-9415-cf319b5dab3b",
|
7273
|
+
# "tradeIv": "",
|
7274
|
+
# "blockTradeId": "",
|
7275
|
+
# "markPrice": "1183.54",
|
7276
|
+
# "execPrice": "1190.15",
|
7277
|
+
# "markIv": "",
|
7278
|
+
# "orderQty": "0.1",
|
7279
|
+
# "orderPrice": "1236.9",
|
7280
|
+
# "execValue": "119.015",
|
7281
|
+
# "execType": "Trade",
|
7282
|
+
# "execQty": "0.1"
|
7283
|
+
# }
|
7284
|
+
# ]
|
7285
|
+
# },
|
7286
|
+
# "retExtInfo": {},
|
7287
|
+
# "time": 1672283754510
|
7288
|
+
# }
|
7289
|
+
#
|
7290
|
+
liquidations = self.add_pagination_cursor_to_result(response)
|
7291
|
+
return self.parse_liquidations(liquidations, market, since, limit)
|
7292
|
+
|
7293
|
+
def parse_liquidation(self, liquidation, market: Market = None):
|
7294
|
+
#
|
7295
|
+
# {
|
7296
|
+
# "symbol": "ETHPERP",
|
7297
|
+
# "orderType": "Market",
|
7298
|
+
# "underlyingPrice": "",
|
7299
|
+
# "orderLinkId": "",
|
7300
|
+
# "side": "Buy",
|
7301
|
+
# "indexPrice": "",
|
7302
|
+
# "orderId": "8c065341-7b52-4ca9-ac2c-37e31ac55c94",
|
7303
|
+
# "stopOrderType": "UNKNOWN",
|
7304
|
+
# "leavesQty": "0",
|
7305
|
+
# "execTime": "1672282722429",
|
7306
|
+
# "isMaker": False,
|
7307
|
+
# "execFee": "0.071409",
|
7308
|
+
# "feeRate": "0.0006",
|
7309
|
+
# "execId": "e0cbe81d-0f18-5866-9415-cf319b5dab3b",
|
7310
|
+
# "tradeIv": "",
|
7311
|
+
# "blockTradeId": "",
|
7312
|
+
# "markPrice": "1183.54",
|
7313
|
+
# "execPrice": "1190.15",
|
7314
|
+
# "markIv": "",
|
7315
|
+
# "orderQty": "0.1",
|
7316
|
+
# "orderPrice": "1236.9",
|
7317
|
+
# "execValue": "119.015",
|
7318
|
+
# "execType": "Trade",
|
7319
|
+
# "execQty": "0.1"
|
7320
|
+
# }
|
7321
|
+
#
|
7322
|
+
marketId = self.safe_string(liquidation, 'symbol')
|
7323
|
+
timestamp = self.safe_integer(liquidation, 'execTime')
|
7324
|
+
contractsString = self.safe_string(liquidation, 'execQty')
|
7325
|
+
contractSizeString = self.safe_string(market, 'contractSize')
|
7326
|
+
priceString = self.safe_string(liquidation, 'execPrice')
|
7327
|
+
baseValueString = Precise.string_mul(contractsString, contractSizeString)
|
7328
|
+
quoteValueString = Precise.string_mul(baseValueString, priceString)
|
7329
|
+
return self.safe_liquidation({
|
7330
|
+
'info': liquidation,
|
7331
|
+
'symbol': self.safe_symbol(marketId, market),
|
7332
|
+
'contracts': self.parse_number(contractsString),
|
7333
|
+
'contractSize': self.parse_number(contractSizeString),
|
7334
|
+
'price': self.parse_number(priceString),
|
7335
|
+
'baseValue': self.parse_number(baseValueString),
|
7336
|
+
'quoteValue': self.parse_number(quoteValueString),
|
7337
|
+
'timestamp': timestamp,
|
7338
|
+
'datetime': self.iso8601(timestamp),
|
7339
|
+
})
|
7340
|
+
|
7215
7341
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
7216
7342
|
url = self.implode_hostname(self.urls['api'][api]) + '/' + path
|
7217
7343
|
if api == 'public':
|
ccxt/independentreserve.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.independentreserve import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
12
12
|
from ccxt.base.precise import Precise
|
@@ -43,6 +43,9 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
43
43
|
'fetchClosedOrders': True,
|
44
44
|
'fetchCrossBorrowRate': False,
|
45
45
|
'fetchCrossBorrowRates': False,
|
46
|
+
'fetchDepositAddress': True,
|
47
|
+
'fetchDepositAddresses': False,
|
48
|
+
'fetchDepositAddressesByNetwork': False,
|
46
49
|
'fetchFundingHistory': False,
|
47
50
|
'fetchFundingRate': False,
|
48
51
|
'fetchFundingRateHistory': False,
|
@@ -671,6 +674,49 @@ class independentreserve(Exchange, ImplicitAPI):
|
|
671
674
|
}
|
672
675
|
return self.privatePostCancelOrder(self.extend(request, params))
|
673
676
|
|
677
|
+
def fetch_deposit_address(self, code: str, params={}):
|
678
|
+
"""
|
679
|
+
fetch the deposit address for a currency associated with self account
|
680
|
+
:see: https://www.independentreserve.com/features/api#GetDigitalCurrencyDepositAddress
|
681
|
+
:param str code: unified currency code
|
682
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
683
|
+
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
684
|
+
"""
|
685
|
+
self.load_markets()
|
686
|
+
currency = self.currency(code)
|
687
|
+
request = {
|
688
|
+
'primaryCurrencyCode': currency['id'],
|
689
|
+
}
|
690
|
+
response = self.privatePostGetDigitalCurrencyDepositAddress(self.extend(request, params))
|
691
|
+
#
|
692
|
+
# {
|
693
|
+
# Tag: '3307446684',
|
694
|
+
# DepositAddress: 'GCCQH4HACMRAD56EZZZ4TOIDQQRVNADMJ35QOFWF4B2VQGODMA2WVQ22',
|
695
|
+
# LastCheckedTimestampUtc: '2024-02-20T11:13:35.6912985Z',
|
696
|
+
# NextUpdateTimestampUtc: '2024-02-20T11:14:56.5112394Z'
|
697
|
+
# }
|
698
|
+
#
|
699
|
+
return self.parse_deposit_address(response)
|
700
|
+
|
701
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
702
|
+
#
|
703
|
+
# {
|
704
|
+
# Tag: '3307446684',
|
705
|
+
# DepositAddress: 'GCCQH4HACMRAD56EZZZ4TOIDQQRVNADMJ35QOFWF4B2VQGODMA2WVQ22',
|
706
|
+
# LastCheckedTimestampUtc: '2024-02-20T11:13:35.6912985Z',
|
707
|
+
# NextUpdateTimestampUtc: '2024-02-20T11:14:56.5112394Z'
|
708
|
+
# }
|
709
|
+
#
|
710
|
+
address = self.safe_string(depositAddress, 'DepositAddress')
|
711
|
+
self.check_address(address)
|
712
|
+
return {
|
713
|
+
'info': depositAddress,
|
714
|
+
'currency': self.safe_string(currency, 'code'),
|
715
|
+
'address': address,
|
716
|
+
'tag': self.safe_string(depositAddress, 'Tag'),
|
717
|
+
'network': None,
|
718
|
+
}
|
719
|
+
|
674
720
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|
675
721
|
url = self.urls['api'][api] + '/' + path
|
676
722
|
if api == 'public':
|
ccxt/latoken.py
CHANGED
@@ -244,6 +244,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
244
244
|
def fetch_time(self, params={}):
|
245
245
|
"""
|
246
246
|
fetches the current integer timestamp in milliseconds from the exchange server
|
247
|
+
:see: https://api.latoken.com/doc/v2/#tag/Time/operation/currentTime
|
247
248
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
248
249
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
249
250
|
"""
|
@@ -258,6 +259,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
258
259
|
def fetch_markets(self, params={}):
|
259
260
|
"""
|
260
261
|
retrieves data on all markets for latoken
|
262
|
+
:see: https://api.latoken.com/doc/v2/#tag/Pair/operation/getActivePairs
|
261
263
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
262
264
|
:returns dict[]: an array of objects representing market data
|
263
265
|
"""
|
@@ -483,6 +485,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
483
485
|
def fetch_balance(self, params={}) -> Balances:
|
484
486
|
"""
|
485
487
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
488
|
+
:see: https://api.latoken.com/doc/v2/#tag/Account/operation/getBalancesByUser
|
486
489
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
487
490
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
488
491
|
"""
|
@@ -543,6 +546,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
543
546
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
544
547
|
"""
|
545
548
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
549
|
+
:see: https://api.latoken.com/doc/v2/#tag/Order-Book/operation/getOrderBook
|
546
550
|
:param str symbol: unified symbol of the market to fetch the order book for
|
547
551
|
:param int [limit]: the maximum amount of order book entries to return
|
548
552
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -625,6 +629,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
625
629
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
626
630
|
"""
|
627
631
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
632
|
+
:see: https://api.latoken.com/doc/v2/#tag/Ticker/operation/getTicker
|
628
633
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
629
634
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
630
635
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -661,6 +666,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
661
666
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
662
667
|
"""
|
663
668
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
669
|
+
:see: https://api.latoken.com/doc/v2/#tag/Ticker/operation/getAllTickers
|
664
670
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
665
671
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
666
672
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -775,6 +781,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
775
781
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
776
782
|
"""
|
777
783
|
get the list of most recent trades for a particular symbol
|
784
|
+
:see: https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByPair
|
778
785
|
:param str symbol: unified symbol of the market to fetch trades for
|
779
786
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
780
787
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -804,6 +811,8 @@ class latoken(Exchange, ImplicitAPI):
|
|
804
811
|
def fetch_trading_fee(self, symbol: str, params={}):
|
805
812
|
"""
|
806
813
|
fetch the trading fees for a market
|
814
|
+
:see: https://api.latoken.com/doc/v2/#tag/Trade/operation/getFeeByPair
|
815
|
+
:see: https://api.latoken.com/doc/v2/#tag/Trade/operation/getAuthFeeByPair
|
807
816
|
:param str symbol: unified market symbol
|
808
817
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
809
818
|
:returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -868,6 +877,8 @@ class latoken(Exchange, ImplicitAPI):
|
|
868
877
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
869
878
|
"""
|
870
879
|
fetch all trades made by the user
|
880
|
+
:see: https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByTrader
|
881
|
+
:see: https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByAssetAndTrader
|
871
882
|
:param str symbol: unified market symbol
|
872
883
|
:param int [since]: the earliest time in ms to fetch trades for
|
873
884
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -1329,6 +1340,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
1329
1340
|
"""
|
1330
1341
|
* @deprecated
|
1331
1342
|
use fetchDepositsWithdrawals instead
|
1343
|
+
:see: https://api.latoken.com/doc/v2/#tag/Transaction/operation/getUserTransactions
|
1332
1344
|
:param str code: unified currency code for the currency of the transactions, default is None
|
1333
1345
|
:param int [since]: timestamp in ms of the earliest transaction, default is None
|
1334
1346
|
:param int [limit]: max number of transactions to return, default is None
|
@@ -1453,6 +1465,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
1453
1465
|
def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1454
1466
|
"""
|
1455
1467
|
fetch a history of internal transfers made on an account
|
1468
|
+
:see: https://api.latoken.com/doc/v2/#tag/Transfer/operation/getUsersTransfers
|
1456
1469
|
:param str code: unified currency code of the currency transferred
|
1457
1470
|
:param int [since]: the earliest time in ms to fetch transfers for
|
1458
1471
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
@@ -1499,6 +1512,9 @@ class latoken(Exchange, ImplicitAPI):
|
|
1499
1512
|
def transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={}) -> TransferEntry:
|
1500
1513
|
"""
|
1501
1514
|
transfer currency internally between wallets on the same account
|
1515
|
+
:see: https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferByEmail
|
1516
|
+
:see: https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferById
|
1517
|
+
:see: https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferByPhone
|
1502
1518
|
:param str code: unified currency code
|
1503
1519
|
:param float amount: amount to transfer
|
1504
1520
|
:param str fromAccount: account to transfer from
|
ccxt/luno.py
CHANGED
@@ -183,6 +183,7 @@ class luno(Exchange, ImplicitAPI):
|
|
183
183
|
def fetch_markets(self, params={}):
|
184
184
|
"""
|
185
185
|
retrieves data on all markets for luno
|
186
|
+
:see: https://www.luno.com/en/developers/api#tag/Market/operation/Markets
|
186
187
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
187
188
|
:returns dict[]: an array of objects representing market data
|
188
189
|
"""
|
@@ -270,6 +271,7 @@ class luno(Exchange, ImplicitAPI):
|
|
270
271
|
def fetch_accounts(self, params={}):
|
271
272
|
"""
|
272
273
|
fetch all the accounts associated with a profile
|
274
|
+
:see: https://www.luno.com/en/developers/api#tag/Accounts/operation/getBalances
|
273
275
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
274
276
|
:returns dict: a dictionary of `account structures <https://docs.ccxt.com/#/?id=account-structure>` indexed by the account type
|
275
277
|
"""
|
@@ -318,6 +320,7 @@ class luno(Exchange, ImplicitAPI):
|
|
318
320
|
def fetch_balance(self, params={}) -> Balances:
|
319
321
|
"""
|
320
322
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
323
|
+
:see: https://www.luno.com/en/developers/api#tag/Accounts/operation/getBalances
|
321
324
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
322
325
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
323
326
|
"""
|
@@ -338,6 +341,8 @@ class luno(Exchange, ImplicitAPI):
|
|
338
341
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
339
342
|
"""
|
340
343
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
344
|
+
:see: https://www.luno.com/en/developers/api#tag/Market/operation/GetOrderBookFull
|
345
|
+
:see: https://www.luno.com/en/developers/api#tag/Market/operation/GetOrderBook
|
341
346
|
:param str symbol: unified symbol of the market to fetch the order book for
|
342
347
|
:param int [limit]: the maximum amount of order book entries to return
|
343
348
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -438,6 +443,7 @@ class luno(Exchange, ImplicitAPI):
|
|
438
443
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
439
444
|
"""
|
440
445
|
fetches information on an order made by the user
|
446
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/GetOrder
|
441
447
|
:param str symbol: not used by luno fetchOrder
|
442
448
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
443
449
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -465,6 +471,7 @@ class luno(Exchange, ImplicitAPI):
|
|
465
471
|
def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
466
472
|
"""
|
467
473
|
fetches information on multiple orders made by the user
|
474
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
|
468
475
|
:param str symbol: unified market symbol of the market orders were made in
|
469
476
|
:param int [since]: the earliest time in ms to fetch orders for
|
470
477
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -476,6 +483,7 @@ class luno(Exchange, ImplicitAPI):
|
|
476
483
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
477
484
|
"""
|
478
485
|
fetch all unfilled currently open orders
|
486
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
|
479
487
|
:param str symbol: unified market symbol
|
480
488
|
:param int [since]: the earliest time in ms to fetch open orders for
|
481
489
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -487,6 +495,7 @@ class luno(Exchange, ImplicitAPI):
|
|
487
495
|
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
488
496
|
"""
|
489
497
|
fetches information on multiple closed orders made by the user
|
498
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
|
490
499
|
:param str symbol: unified market symbol of the market orders were made in
|
491
500
|
:param int [since]: the earliest time in ms to fetch orders for
|
492
501
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -535,6 +544,7 @@ class luno(Exchange, ImplicitAPI):
|
|
535
544
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
536
545
|
"""
|
537
546
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
547
|
+
:see: https://www.luno.com/en/developers/api#tag/Market/operation/GetTickers
|
538
548
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
539
549
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
540
550
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -556,6 +566,7 @@ class luno(Exchange, ImplicitAPI):
|
|
556
566
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
557
567
|
"""
|
558
568
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
569
|
+
:see: https://www.luno.com/en/developers/api#tag/Market/operation/GetTicker
|
559
570
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
560
571
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
561
572
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -664,6 +675,7 @@ class luno(Exchange, ImplicitAPI):
|
|
664
675
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
665
676
|
"""
|
666
677
|
get the list of most recent trades for a particular symbol
|
678
|
+
:see: https://www.luno.com/en/developers/api#tag/Market/operation/ListTrades
|
667
679
|
:param str symbol: unified symbol of the market to fetch trades for
|
668
680
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
669
681
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -757,6 +769,7 @@ class luno(Exchange, ImplicitAPI):
|
|
757
769
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
758
770
|
"""
|
759
771
|
fetch all trades made by the user
|
772
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/ListUserTrades
|
760
773
|
:param str symbol: unified market symbol
|
761
774
|
:param int [since]: the earliest time in ms to fetch trades for
|
762
775
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -802,6 +815,7 @@ class luno(Exchange, ImplicitAPI):
|
|
802
815
|
def fetch_trading_fee(self, symbol: str, params={}):
|
803
816
|
"""
|
804
817
|
fetch the trading fees for a market
|
818
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/getFeeInfo
|
805
819
|
:param str symbol: unified market symbol
|
806
820
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
807
821
|
:returns dict: a `fee structure <https://docs.ccxt.com/#/?id=fee-structure>`
|
@@ -829,6 +843,8 @@ class luno(Exchange, ImplicitAPI):
|
|
829
843
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
830
844
|
"""
|
831
845
|
create a trade order
|
846
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/PostMarketOrder
|
847
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/PostLimitOrder
|
832
848
|
:param str symbol: unified symbol of the market to create an order in
|
833
849
|
:param str type: 'market' or 'limit'
|
834
850
|
:param str side: 'buy' or 'sell'
|
@@ -864,6 +880,7 @@ class luno(Exchange, ImplicitAPI):
|
|
864
880
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
865
881
|
"""
|
866
882
|
cancels an open order
|
883
|
+
:see: https://www.luno.com/en/developers/api#tag/Orders/operation/StopOrder
|
867
884
|
:param str id: order id
|
868
885
|
:param str symbol: unified symbol of the market the order was made in
|
869
886
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -891,6 +908,7 @@ class luno(Exchange, ImplicitAPI):
|
|
891
908
|
def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
892
909
|
"""
|
893
910
|
fetch the history of changes, actions done by the user or operations that altered balance of the user
|
911
|
+
:see: https://www.luno.com/en/developers/api#tag/Accounts/operation/ListTransactions
|
894
912
|
:param str code: unified currency code, default is None
|
895
913
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
896
914
|
:param int [limit]: max number of ledger entrys to return, default is None
|
ccxt/lykke.py
CHANGED
@@ -190,6 +190,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
190
190
|
def fetch_currencies(self, params={}):
|
191
191
|
"""
|
192
192
|
fetches all available currencies on an exchange
|
193
|
+
:see: https://lykkecity.github.io/Trading-API/#get-all-assets
|
193
194
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
194
195
|
:returns dict: an associative dictionary of currencies
|
195
196
|
"""
|
@@ -265,6 +266,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
265
266
|
def fetch_markets(self, params={}):
|
266
267
|
"""
|
267
268
|
retrieves data on all markets for lykke
|
269
|
+
:see: https://lykkecity.github.io/Trading-API/#get-asset-by-id
|
268
270
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
269
271
|
:returns dict[]: an array of objects representing market data
|
270
272
|
"""
|
@@ -421,6 +423,8 @@ class lykke(Exchange, ImplicitAPI):
|
|
421
423
|
def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
422
424
|
"""
|
423
425
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
426
|
+
:see: https://lykkecity.github.io/Trading-API/#get-current-prices
|
427
|
+
:see: https://lykkecity.github.io/Trading-API/#24hr-ticker-price-change-statistics
|
424
428
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
425
429
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
426
430
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -476,6 +480,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
476
480
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
477
481
|
"""
|
478
482
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
483
|
+
:see: https://lykkecity.github.io/Trading-API/#24hr-ticker-price-change-statistics
|
479
484
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
480
485
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
481
486
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -505,6 +510,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
505
510
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
506
511
|
"""
|
507
512
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
513
|
+
:see: https://lykkecity.github.io/Trading-API/#asset-pair-order-book-ticker
|
508
514
|
:param str symbol: unified symbol of the market to fetch the order book for
|
509
515
|
:param int [limit]: the maximum amount of order book entries to return
|
510
516
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -605,6 +611,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
605
611
|
def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
606
612
|
"""
|
607
613
|
get the list of most recent trades for a particular symbol
|
614
|
+
:see: https://lykkecity.github.io/Trading-API/#get-public-trades
|
608
615
|
:param str symbol: unified symbol of the market to fetch trades for
|
609
616
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
610
617
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -665,6 +672,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
665
672
|
def fetch_balance(self, params={}) -> Balances:
|
666
673
|
"""
|
667
674
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
675
|
+
:see: https://lykkecity.github.io/Trading-API/#get-the-current-balance
|
668
676
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
669
677
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
670
678
|
"""
|
@@ -758,6 +766,8 @@ class lykke(Exchange, ImplicitAPI):
|
|
758
766
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
759
767
|
"""
|
760
768
|
create a trade order
|
769
|
+
:see: https://lykkecity.github.io/Trading-API/#place-a-limit-order
|
770
|
+
:see: https://lykkecity.github.io/Trading-API/#place-a-market-order
|
761
771
|
:param str symbol: unified symbol of the market to create an order in
|
762
772
|
:param str type: 'market' or 'limit'
|
763
773
|
:param str side: 'buy' or 'sell'
|
@@ -828,6 +838,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
828
838
|
def cancel_order(self, id: str, symbol: Str = None, params={}):
|
829
839
|
"""
|
830
840
|
cancels an open order
|
841
|
+
:see: https://lykkecity.github.io/Trading-API/#cancel-orders-by-id
|
831
842
|
:param str id: order id
|
832
843
|
:param str symbol: unified symbol of the market the order was made in
|
833
844
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -847,6 +858,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
847
858
|
def cancel_all_orders(self, symbol: Str = None, params={}):
|
848
859
|
"""
|
849
860
|
cancel all open orders
|
861
|
+
:see: https://lykkecity.github.io/Trading-API/#mass-cancel-orders
|
850
862
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
851
863
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
852
864
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -870,6 +882,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
870
882
|
def fetch_order(self, id: str, symbol: Str = None, params={}):
|
871
883
|
"""
|
872
884
|
fetches information on an order made by the user
|
885
|
+
:see: https://lykkecity.github.io/Trading-API/#get-order-by-id
|
873
886
|
:param str symbol: not used by lykke fetchOrder
|
874
887
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
875
888
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -904,6 +917,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
904
917
|
def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
905
918
|
"""
|
906
919
|
fetch all unfilled currently open orders
|
920
|
+
:see: https://lykkecity.github.io/Trading-API/#get-active-or-closed-orders
|
907
921
|
:param str symbol: unified market symbol
|
908
922
|
:param int [since]: the earliest time in ms to fetch open orders for
|
909
923
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
@@ -948,6 +962,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
948
962
|
def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
949
963
|
"""
|
950
964
|
fetches information on multiple closed orders made by the user
|
965
|
+
:see: https://lykkecity.github.io/Trading-API/#get-active-or-closed-orders
|
951
966
|
:param str symbol: unified market symbol of the market orders were made in
|
952
967
|
:param int [since]: the earliest time in ms to fetch orders for
|
953
968
|
:param int [limit]: the maximum number of order structures to retrieve
|
@@ -992,6 +1007,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
992
1007
|
def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
993
1008
|
"""
|
994
1009
|
fetch all trades made by the user
|
1010
|
+
:see: https://lykkecity.github.io/Trading-API/#get-trade-history
|
995
1011
|
:param str symbol: unified market symbol
|
996
1012
|
:param int [since]: the earliest time in ms to fetch trades for
|
997
1013
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -1046,6 +1062,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
1046
1062
|
def fetch_deposit_address(self, code: str, params={}):
|
1047
1063
|
"""
|
1048
1064
|
fetch the deposit address for a currency associated with self account
|
1065
|
+
:see: https://lykkecity.github.io/Trading-API/#get-deposit-address-for-a-given-asset
|
1049
1066
|
:param str code: unified currency code
|
1050
1067
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1051
1068
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
@@ -1139,6 +1156,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
1139
1156
|
def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1140
1157
|
"""
|
1141
1158
|
fetch history of deposits and withdrawals
|
1159
|
+
:see: https://lykkecity.github.io/Trading-API/#get-the-history-of-withdrawals-and-deposits
|
1142
1160
|
:param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
|
1143
1161
|
:param int [since]: timestamp in ms of the earliest deposit/withdrawal, default is None
|
1144
1162
|
:param int [limit]: max number of deposit/withdrawals to return, default is None
|
@@ -1177,6 +1195,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
1177
1195
|
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1178
1196
|
"""
|
1179
1197
|
make a withdrawal
|
1198
|
+
:see: https://lykkecity.github.io/Trading-API/#withdrawal
|
1180
1199
|
:param str code: unified currency code
|
1181
1200
|
:param float amount: the amount to withdraw
|
1182
1201
|
:param str address: the address to withdraw to
|