ccxt 4.2.30__py2.py3-none-any.whl → 4.2.34__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +1 -1
- ccxt/abstract/coinbase.py +10 -0
- ccxt/abstract/okx.py +12 -1
- ccxt/ace.py +4 -3
- ccxt/alpaca.py +1 -1
- ccxt/ascendex.py +6 -6
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +4 -3
- ccxt/async_support/alpaca.py +1 -1
- ccxt/async_support/ascendex.py +6 -6
- ccxt/async_support/base/exchange.py +62 -39
- ccxt/async_support/bigone.py +25 -5
- ccxt/async_support/binance.py +17 -16
- ccxt/async_support/bingx.py +10 -9
- ccxt/async_support/bit2c.py +13 -1
- ccxt/async_support/bitbank.py +2 -2
- ccxt/async_support/bitbns.py +1 -1
- ccxt/async_support/bitfinex.py +5 -5
- ccxt/async_support/bitfinex2.py +386 -40
- ccxt/async_support/bitflyer.py +5 -5
- ccxt/async_support/bitforex.py +4 -1
- ccxt/async_support/bitget.py +11 -11
- ccxt/async_support/bithumb.py +2 -2
- ccxt/async_support/bitmart.py +9 -9
- ccxt/async_support/bitmex.py +3 -3
- ccxt/async_support/bitopro.py +2 -2
- ccxt/async_support/bitrue.py +8 -8
- ccxt/async_support/bitso.py +4 -4
- ccxt/async_support/bitstamp.py +2 -2
- ccxt/async_support/bitteam.py +1 -1
- ccxt/async_support/bitvavo.py +3 -3
- ccxt/async_support/bl3p.py +1 -1
- ccxt/async_support/blockchaincom.py +3 -3
- ccxt/async_support/btcalpha.py +1 -1
- ccxt/async_support/btcbox.py +1 -1
- ccxt/async_support/btcmarkets.py +2 -2
- ccxt/async_support/btcturk.py +1 -1
- ccxt/async_support/bybit.py +9 -9
- ccxt/async_support/cex.py +1 -1
- ccxt/async_support/coinbase.py +16 -6
- ccxt/async_support/coinbasepro.py +2 -2
- ccxt/async_support/coincheck.py +1 -1
- ccxt/async_support/coinex.py +9 -9
- ccxt/async_support/coinlist.py +4 -4
- ccxt/async_support/coinmate.py +2 -2
- ccxt/async_support/coinmetro.py +2 -2
- ccxt/async_support/coinone.py +1 -1
- ccxt/async_support/coinsph.py +2 -2
- ccxt/async_support/coinspot.py +1 -1
- ccxt/async_support/cryptocom.py +14 -14
- ccxt/async_support/currencycom.py +1 -1
- ccxt/async_support/delta.py +2 -2
- ccxt/async_support/deribit.py +5 -4
- ccxt/async_support/digifinex.py +6 -6
- ccxt/async_support/exmo.py +2 -2
- ccxt/async_support/gate.py +41 -37
- ccxt/async_support/gemini.py +2 -2
- ccxt/async_support/hitbtc.py +5 -5
- ccxt/async_support/hollaex.py +2 -2
- ccxt/async_support/htx.py +11 -11
- ccxt/async_support/huobijp.py +4 -4
- ccxt/async_support/idex.py +2 -2
- ccxt/async_support/independentreserve.py +2 -2
- ccxt/async_support/indodax.py +2 -2
- ccxt/async_support/kraken.py +45 -5
- ccxt/async_support/krakenfutures.py +8 -5
- ccxt/async_support/kucoin.py +8 -8
- ccxt/async_support/kucoinfutures.py +4 -4
- ccxt/async_support/kuna.py +2 -2
- ccxt/async_support/latoken.py +3 -3
- ccxt/async_support/lbank.py +5 -4
- ccxt/async_support/luno.py +1 -1
- ccxt/async_support/lykke.py +2 -2
- ccxt/async_support/mercado.py +2 -2
- ccxt/async_support/mexc.py +7 -6
- ccxt/async_support/ndax.py +2 -2
- ccxt/async_support/novadax.py +4 -4
- ccxt/async_support/oceanex.py +1 -1
- ccxt/async_support/okcoin.py +5 -5
- ccxt/async_support/okx.py +26 -12
- ccxt/async_support/onetrading.py +2 -2
- ccxt/async_support/p2b.py +1 -1
- ccxt/async_support/paymium.py +3 -3
- ccxt/async_support/phemex.py +13 -13
- ccxt/async_support/poloniex.py +4 -4
- ccxt/async_support/poloniexfutures.py +4 -1
- ccxt/async_support/probit.py +5 -5
- ccxt/async_support/timex.py +2 -2
- ccxt/async_support/tokocrypto.py +4 -4
- ccxt/async_support/upbit.py +2 -2
- ccxt/async_support/wavesexchange.py +4 -3
- ccxt/async_support/wazirx.py +1 -1
- ccxt/async_support/whitebit.py +6 -6
- ccxt/async_support/woo.py +6 -6
- ccxt/async_support/yobit.py +41 -2
- ccxt/async_support/zaif.py +2 -2
- ccxt/async_support/zonda.py +4 -4
- ccxt/base/exchange.py +77 -44
- ccxt/base/types.py +10 -0
- ccxt/bigone.py +25 -5
- ccxt/binance.py +17 -16
- ccxt/bingx.py +10 -9
- ccxt/bit2c.py +13 -1
- ccxt/bitbank.py +2 -2
- ccxt/bitbns.py +1 -1
- ccxt/bitfinex.py +5 -5
- ccxt/bitfinex2.py +386 -40
- ccxt/bitflyer.py +5 -5
- ccxt/bitforex.py +4 -1
- ccxt/bitget.py +11 -11
- ccxt/bithumb.py +2 -2
- ccxt/bitmart.py +9 -9
- ccxt/bitmex.py +3 -3
- ccxt/bitopro.py +2 -2
- ccxt/bitrue.py +8 -8
- ccxt/bitso.py +4 -4
- ccxt/bitstamp.py +2 -2
- ccxt/bitteam.py +1 -1
- ccxt/bitvavo.py +3 -3
- ccxt/bl3p.py +1 -1
- ccxt/blockchaincom.py +3 -3
- ccxt/btcalpha.py +1 -1
- ccxt/btcbox.py +1 -1
- ccxt/btcmarkets.py +2 -2
- ccxt/btcturk.py +1 -1
- ccxt/bybit.py +9 -9
- ccxt/cex.py +1 -1
- ccxt/coinbase.py +16 -6
- ccxt/coinbasepro.py +2 -2
- ccxt/coincheck.py +1 -1
- ccxt/coinex.py +9 -9
- ccxt/coinlist.py +4 -4
- ccxt/coinmate.py +2 -2
- ccxt/coinmetro.py +2 -2
- ccxt/coinone.py +1 -1
- ccxt/coinsph.py +2 -2
- ccxt/coinspot.py +1 -1
- ccxt/cryptocom.py +14 -14
- ccxt/currencycom.py +1 -1
- ccxt/delta.py +2 -2
- ccxt/deribit.py +5 -4
- ccxt/digifinex.py +6 -6
- ccxt/exmo.py +2 -2
- ccxt/gate.py +41 -37
- ccxt/gemini.py +2 -2
- ccxt/hitbtc.py +5 -5
- ccxt/hollaex.py +2 -2
- ccxt/htx.py +11 -11
- ccxt/huobijp.py +4 -4
- ccxt/idex.py +2 -2
- ccxt/independentreserve.py +2 -2
- ccxt/indodax.py +2 -2
- ccxt/kraken.py +45 -5
- ccxt/krakenfutures.py +8 -5
- ccxt/kucoin.py +8 -8
- ccxt/kucoinfutures.py +4 -4
- ccxt/kuna.py +2 -2
- ccxt/latoken.py +3 -3
- ccxt/lbank.py +5 -4
- ccxt/luno.py +1 -1
- ccxt/lykke.py +2 -2
- ccxt/mercado.py +2 -2
- ccxt/mexc.py +7 -6
- ccxt/ndax.py +2 -2
- ccxt/novadax.py +4 -4
- ccxt/oceanex.py +1 -1
- ccxt/okcoin.py +5 -5
- ccxt/okx.py +26 -12
- ccxt/onetrading.py +2 -2
- ccxt/p2b.py +1 -1
- ccxt/paymium.py +3 -3
- ccxt/phemex.py +13 -13
- ccxt/poloniex.py +4 -4
- ccxt/poloniexfutures.py +4 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/alpaca.py +8 -4
- ccxt/pro/ascendex.py +1 -2
- ccxt/pro/binance.py +14 -10
- ccxt/pro/bingx.py +1 -1
- ccxt/pro/bitfinex.py +21 -22
- ccxt/pro/bitfinex2.py +13 -15
- ccxt/pro/bitget.py +3 -1
- ccxt/pro/bitmart.py +3 -7
- ccxt/pro/bitmex.py +4 -6
- ccxt/pro/bitopro.py +2 -4
- ccxt/pro/bitrue.py +1 -1
- ccxt/pro/bitstamp.py +2 -3
- ccxt/pro/bitvavo.py +10 -5
- ccxt/pro/blockchaincom.py +22 -22
- ccxt/pro/bybit.py +5 -5
- ccxt/pro/cex.py +7 -7
- ccxt/pro/coinbase.py +3 -2
- ccxt/pro/coinbasepro.py +1 -1
- ccxt/pro/coinex.py +15 -13
- ccxt/pro/currencycom.py +5 -6
- ccxt/pro/deribit.py +4 -4
- ccxt/pro/exmo.py +15 -13
- ccxt/pro/gate.py +1 -1
- ccxt/pro/gemini.py +4 -2
- ccxt/pro/hitbtc.py +10 -9
- ccxt/pro/hollaex.py +2 -2
- ccxt/pro/htx.py +6 -6
- ccxt/pro/huobijp.py +3 -4
- ccxt/pro/idex.py +1 -1
- ccxt/pro/independentreserve.py +14 -13
- ccxt/pro/kraken.py +10 -14
- ccxt/pro/krakenfutures.py +10 -6
- ccxt/pro/kucoin.py +10 -10
- ccxt/pro/kucoinfutures.py +11 -10
- ccxt/pro/lbank.py +10 -10
- ccxt/pro/luno.py +12 -14
- ccxt/pro/mexc.py +3 -2
- ccxt/pro/ndax.py +7 -11
- ccxt/pro/okcoin.py +7 -10
- ccxt/pro/okx.py +6 -9
- ccxt/pro/onetrading.py +16 -15
- ccxt/pro/p2b.py +5 -3
- ccxt/pro/phemex.py +16 -11
- ccxt/pro/poloniex.py +6 -4
- ccxt/pro/poloniexfutures.py +13 -9
- ccxt/pro/probit.py +15 -12
- ccxt/pro/upbit.py +8 -8
- ccxt/pro/wazirx.py +6 -3
- ccxt/pro/woo.py +9 -7
- ccxt/probit.py +5 -5
- ccxt/test/base/test_order_book.py +7 -7
- ccxt/test/base/test_shared_methods.py +1 -1
- ccxt/test/test_async.py +86 -36
- ccxt/test/test_sync.py +86 -36
- ccxt/timex.py +2 -2
- ccxt/tokocrypto.py +4 -4
- ccxt/upbit.py +2 -2
- ccxt/wavesexchange.py +4 -3
- ccxt/wazirx.py +1 -1
- ccxt/whitebit.py +6 -6
- ccxt/woo.py +6 -6
- ccxt/yobit.py +41 -2
- ccxt/zaif.py +2 -2
- ccxt/zonda.py +4 -4
- {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/METADATA +10 -10
- ccxt-4.2.34.dist-info/RECORD +438 -0
- ccxt-4.2.30.dist-info/RECORD +0 -438
- {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/WHEEL +0 -0
- {ccxt-4.2.30.dist-info → ccxt-4.2.34.dist-info}/top_level.txt +0 -0
ccxt/kucoin.py
CHANGED
@@ -8,7 +8,7 @@ from ccxt.abstract.kucoin import ImplicitAPI
|
|
8
8
|
import hashlib
|
9
9
|
import math
|
10
10
|
import json
|
11
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
12
12
|
from typing import List
|
13
13
|
from ccxt.base.errors import ExchangeError
|
14
14
|
from ccxt.base.errors import PermissionDenied
|
@@ -1823,7 +1823,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1823
1823
|
raise ExchangeError(self.id + ' createOrder() - you should use either triggerPrice or stopLossPrice or takeProfitPrice')
|
1824
1824
|
return [triggerPrice, stopLossPrice, takeProfitPrice]
|
1825
1825
|
|
1826
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1826
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1827
1827
|
"""
|
1828
1828
|
Create an order on the exchange
|
1829
1829
|
:see: https://docs.kucoin.com/spot#place-a-new-order
|
@@ -2016,7 +2016,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2016
2016
|
data = self.safe_value(data, 'data', [])
|
2017
2017
|
return self.parse_orders(data)
|
2018
2018
|
|
2019
|
-
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2019
|
+
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
2020
2020
|
market = self.market(symbol)
|
2021
2021
|
# required param, cannot be used twice
|
2022
2022
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId', self.uuid())
|
@@ -2911,7 +2911,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2911
2911
|
'tierBased': True,
|
2912
2912
|
}
|
2913
2913
|
|
2914
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2914
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2915
2915
|
"""
|
2916
2916
|
make a withdrawal
|
2917
2917
|
:see: https://docs.kucoin.com/#apply-withdraw-2
|
@@ -3372,7 +3372,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3372
3372
|
returnType = result if isolated else self.safe_balance(result)
|
3373
3373
|
return returnType
|
3374
3374
|
|
3375
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
3375
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
3376
3376
|
"""
|
3377
3377
|
transfer currency internally between wallets on the same account
|
3378
3378
|
:see: https://docs.kucoin.com/#inner-transfer
|
@@ -3944,7 +3944,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3944
3944
|
'info': info,
|
3945
3945
|
}
|
3946
3946
|
|
3947
|
-
def borrow_cross_margin(self, code: str, amount, params={}):
|
3947
|
+
def borrow_cross_margin(self, code: str, amount: float, params={}):
|
3948
3948
|
"""
|
3949
3949
|
create a loan to borrow margin
|
3950
3950
|
:see: https://docs.kucoin.com/#1-margin-borrowing
|
@@ -3977,7 +3977,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3977
3977
|
data = self.safe_value(response, 'data', {})
|
3978
3978
|
return self.parse_margin_loan(data, currency)
|
3979
3979
|
|
3980
|
-
def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
3980
|
+
def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
|
3981
3981
|
"""
|
3982
3982
|
create a loan to borrow margin
|
3983
3983
|
:see: https://docs.kucoin.com/#1-margin-borrowing
|
@@ -4149,7 +4149,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4149
4149
|
endpart = ''
|
4150
4150
|
headers = headers if (headers is not None) else {}
|
4151
4151
|
url = self.urls['api'][api]
|
4152
|
-
if query:
|
4152
|
+
if not self.is_empty(query):
|
4153
4153
|
if (method == 'GET') or (method == 'DELETE'):
|
4154
4154
|
endpoint += '?' + self.rawencode(query)
|
4155
4155
|
else:
|
ccxt/kucoinfutures.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.kucoin import kucoin
|
7
7
|
from ccxt.abstract.kucoinfutures import ImplicitAPI
|
8
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
|
8
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Trade, Transaction
|
9
9
|
from typing import List
|
10
10
|
from ccxt.base.errors import PermissionDenied
|
11
11
|
from ccxt.base.errors import AccountSuspended
|
@@ -1060,7 +1060,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1060
1060
|
'takeProfitPrice': None,
|
1061
1061
|
})
|
1062
1062
|
|
1063
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1063
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1064
1064
|
"""
|
1065
1065
|
Create an order on the exchange
|
1066
1066
|
:see: https://docs.kucoin.com/futures/#place-an-order
|
@@ -1154,7 +1154,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1154
1154
|
data = self.safe_value(response, 'data', [])
|
1155
1155
|
return self.parse_orders(data)
|
1156
1156
|
|
1157
|
-
def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1157
|
+
def create_contract_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1158
1158
|
market = self.market(symbol)
|
1159
1159
|
# required param, cannot be used twice
|
1160
1160
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId', self.uuid())
|
@@ -1842,7 +1842,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1842
1842
|
#
|
1843
1843
|
return self.parse_balance(response)
|
1844
1844
|
|
1845
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1845
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1846
1846
|
"""
|
1847
1847
|
transfer currency internally between wallets on the same account
|
1848
1848
|
:param str code: unified currency code
|
ccxt/kuna.py
CHANGED
@@ -913,7 +913,7 @@ class kuna(Exchange, ImplicitAPI):
|
|
913
913
|
data = self.safe_value(response, 'data', [])
|
914
914
|
return self.parse_balance(data)
|
915
915
|
|
916
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
916
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
917
917
|
"""
|
918
918
|
create a trade order
|
919
919
|
:see: https://docs.kuna.io/docs/create-a-new-order-private
|
@@ -1337,7 +1337,7 @@ class kuna(Exchange, ImplicitAPI):
|
|
1337
1337
|
data = self.safe_value(response, 'data')
|
1338
1338
|
return self.parse_trades(data, market, since, limit)
|
1339
1339
|
|
1340
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1340
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1341
1341
|
"""
|
1342
1342
|
make a withdrawal
|
1343
1343
|
:see: https://docs.kuna.io/docs/create-a-withdraw
|
ccxt/latoken.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.latoken import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -1192,7 +1192,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
1192
1192
|
#
|
1193
1193
|
return self.parse_order(response)
|
1194
1194
|
|
1195
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1195
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1196
1196
|
"""
|
1197
1197
|
create a trade order
|
1198
1198
|
:see: https://api.latoken.com/doc/v2/#tag/Order/operation/placeOrder
|
@@ -1493,7 +1493,7 @@ class latoken(Exchange, ImplicitAPI):
|
|
1493
1493
|
transfers = self.safe_value(response, 'content', [])
|
1494
1494
|
return self.parse_transfers(transfers, currency, since, limit)
|
1495
1495
|
|
1496
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1496
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1497
1497
|
"""
|
1498
1498
|
transfer currency internally between wallets on the same account
|
1499
1499
|
:param str code: unified currency code
|
ccxt/lbank.py
CHANGED
@@ -61,6 +61,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
61
61
|
'fetchClosedOrders': False,
|
62
62
|
'fetchCrossBorrowRate': False,
|
63
63
|
'fetchCrossBorrowRates': False,
|
64
|
+
'fetchDepositAddress': True,
|
64
65
|
'fetchDepositWithdrawFee': 'emulated',
|
65
66
|
'fetchDepositWithdrawFees': True,
|
66
67
|
'fetchFundingHistory': False,
|
@@ -345,7 +346,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
345
346
|
|
346
347
|
def fetch_markets(self, params={}):
|
347
348
|
"""
|
348
|
-
retrieves data on all markets for
|
349
|
+
retrieves data on all markets for lbank
|
349
350
|
:see: https://www.lbank.com/en-US/docs/index.html#trading-pairs
|
350
351
|
:see: https://www.lbank.com/en-US/docs/contract.html#query-contract-information-list
|
351
352
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1243,7 +1244,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
1243
1244
|
params['createMarketBuyOrderRequiresPrice'] = False
|
1244
1245
|
return self.create_order(symbol, 'market', 'buy', cost, None, params)
|
1245
1246
|
|
1246
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1247
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1247
1248
|
"""
|
1248
1249
|
create a trade order
|
1249
1250
|
:see: https://www.lbank.com/en-US/docs/index.html#place-order
|
@@ -1903,7 +1904,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
1903
1904
|
'info': response,
|
1904
1905
|
}
|
1905
1906
|
|
1906
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1907
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}) -> Transaction:
|
1907
1908
|
"""
|
1908
1909
|
make a withdrawal
|
1909
1910
|
:see: https://www.lbank.com/en-US/docs/index.html#withdrawal
|
@@ -2166,7 +2167,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
2166
2167
|
"""
|
2167
2168
|
* @deprecated
|
2168
2169
|
please use fetchDepositWithdrawFees instead
|
2169
|
-
:param str[]|None codes: not used by
|
2170
|
+
:param str[]|None codes: not used by lbank fetchTransactionFees()
|
2170
2171
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2171
2172
|
:returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
2172
2173
|
"""
|
ccxt/luno.py
CHANGED
@@ -826,7 +826,7 @@ class luno(Exchange, ImplicitAPI):
|
|
826
826
|
'taker': self.safe_number(response, 'taker_fee'),
|
827
827
|
}
|
828
828
|
|
829
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
829
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
830
830
|
"""
|
831
831
|
create a trade order
|
832
832
|
:param str symbol: unified symbol of the market to create an order in
|
ccxt/lykke.py
CHANGED
@@ -755,7 +755,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
755
755
|
'trades': None,
|
756
756
|
}, market)
|
757
757
|
|
758
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
758
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
759
759
|
"""
|
760
760
|
create a trade order
|
761
761
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -1174,7 +1174,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
1174
1174
|
currency = self.currency(code)
|
1175
1175
|
return self.parse_transactions(payload, currency, since, limit)
|
1176
1176
|
|
1177
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1177
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1178
1178
|
"""
|
1179
1179
|
make a withdrawal
|
1180
1180
|
:param str code: unified currency code
|
ccxt/mercado.py
CHANGED
@@ -412,7 +412,7 @@ class mercado(Exchange, ImplicitAPI):
|
|
412
412
|
response = self.privatePostGetAccountInfo(params)
|
413
413
|
return self.parse_balance(response)
|
414
414
|
|
415
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
415
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
416
416
|
"""
|
417
417
|
create a trade order
|
418
418
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -591,7 +591,7 @@ class mercado(Exchange, ImplicitAPI):
|
|
591
591
|
order = self.safe_value(responseData, 'order')
|
592
592
|
return self.parse_order(order, market)
|
593
593
|
|
594
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
594
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
595
595
|
"""
|
596
596
|
make a withdrawal
|
597
597
|
:param str code: unified currency code
|
ccxt/mexc.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.mexc import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, IndexType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, IndexType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -1339,7 +1339,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
1339
1339
|
orderbook['nonce'] = self.safe_integer(data, 'version')
|
1340
1340
|
return orderbook
|
1341
1341
|
|
1342
|
-
def parse_bid_ask(self, bidask, priceKey: IndexType = 0, amountKey: IndexType = 1,
|
1342
|
+
def parse_bid_ask(self, bidask, priceKey: IndexType = 0, amountKey: IndexType = 1, countOrIdKey: IndexType = 2):
|
1343
|
+
countKey = 2
|
1343
1344
|
price = self.safe_number(bidask, priceKey)
|
1344
1345
|
amount = self.safe_number(bidask, amountKey)
|
1345
1346
|
count = self.safe_number(bidask, countKey)
|
@@ -2017,7 +2018,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
2017
2018
|
params['createMarketBuyOrderRequiresPrice'] = False
|
2018
2019
|
return self.create_order(symbol, 'market', 'buy', cost, None, params)
|
2019
2020
|
|
2020
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2021
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
2021
2022
|
"""
|
2022
2023
|
create a trade order
|
2023
2024
|
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#new-order
|
@@ -3698,7 +3699,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
3698
3699
|
"""
|
3699
3700
|
return self.modify_margin_helper(symbol, amount, 'ADD', params)
|
3700
3701
|
|
3701
|
-
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
3702
|
+
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
3702
3703
|
"""
|
3703
3704
|
set the level of leverage for a market
|
3704
3705
|
:param float leverage: the rate of leverage
|
@@ -4582,7 +4583,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4582
4583
|
#
|
4583
4584
|
return self.parse_transfers(resultList, currency, since, limit)
|
4584
4585
|
|
4585
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
4586
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
4586
4587
|
"""
|
4587
4588
|
transfer currency internally between wallets on the same account
|
4588
4589
|
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#user-universal-transfer
|
@@ -4707,7 +4708,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4707
4708
|
}
|
4708
4709
|
return self.safe_string(statuses, status, status)
|
4709
4710
|
|
4710
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
4711
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
4711
4712
|
"""
|
4712
4713
|
make a withdrawal
|
4713
4714
|
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw
|
ccxt/ndax.py
CHANGED
@@ -1274,7 +1274,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1274
1274
|
'trades': None,
|
1275
1275
|
}, market)
|
1276
1276
|
|
1277
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1277
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1278
1278
|
"""
|
1279
1279
|
create a trade order
|
1280
1280
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -2173,7 +2173,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
2173
2173
|
'network': None,
|
2174
2174
|
}
|
2175
2175
|
|
2176
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2176
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2177
2177
|
"""
|
2178
2178
|
make a withdrawal
|
2179
2179
|
:param str code: unified currency code
|
ccxt/novadax.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.novadax import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -715,7 +715,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
715
715
|
#
|
716
716
|
return self.parse_balance(response)
|
717
717
|
|
718
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
718
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
719
719
|
"""
|
720
720
|
create a trade order
|
721
721
|
:see: https://doc.novadax.com/en-US/#order-introduction
|
@@ -1083,7 +1083,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1083
1083
|
'trades': None,
|
1084
1084
|
}, market)
|
1085
1085
|
|
1086
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1086
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
1087
1087
|
"""
|
1088
1088
|
transfer currency internally between wallets on the same account
|
1089
1089
|
:see: https://doc.novadax.com/en-US/#get-sub-account-transfer
|
@@ -1154,7 +1154,7 @@ class novadax(Exchange, ImplicitAPI):
|
|
1154
1154
|
}
|
1155
1155
|
return self.safe_string(statuses, status, 'failed')
|
1156
1156
|
|
1157
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1157
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1158
1158
|
"""
|
1159
1159
|
make a withdrawal
|
1160
1160
|
:see: https://doc.novadax.com/en-US/#send-cryptocurrencies
|
ccxt/oceanex.py
CHANGED
@@ -594,7 +594,7 @@ class oceanex(Exchange, ImplicitAPI):
|
|
594
594
|
response = self.privateGetMembersMe(params)
|
595
595
|
return self.parse_balance(response)
|
596
596
|
|
597
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
597
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
598
598
|
"""
|
599
599
|
create a trade order
|
600
600
|
:see: https://api.oceanex.pro/doc/v1/#new-order-post
|
ccxt/okcoin.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.okcoin import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -1261,7 +1261,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
1261
1261
|
params['tgtCcy'] = 'quote_ccy'
|
1262
1262
|
return self.create_order(symbol, 'market', 'buy', cost, None, params)
|
1263
1263
|
|
1264
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1264
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1265
1265
|
"""
|
1266
1266
|
:see: https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-order
|
1267
1267
|
:see: https://www.okcoin.com/docs-v5/en/#rest-api-trade-place-algo-order
|
@@ -1316,7 +1316,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
1316
1316
|
order['side'] = side
|
1317
1317
|
return order
|
1318
1318
|
|
1319
|
-
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1319
|
+
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1320
1320
|
market = self.market(symbol)
|
1321
1321
|
request = {
|
1322
1322
|
'instId': market['id'],
|
@@ -2143,7 +2143,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
2143
2143
|
parsed = self.parse_deposit_addresses(filtered, [currency['code']], False)
|
2144
2144
|
return self.index_by(parsed, 'network')
|
2145
2145
|
|
2146
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
2146
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
2147
2147
|
"""
|
2148
2148
|
:see: https://www.okcoin.com/docs-v5/en/#rest-api-funding-funds-transfer
|
2149
2149
|
transfer currency internally between wallets on the same account
|
@@ -2282,7 +2282,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
2282
2282
|
}
|
2283
2283
|
return self.safe_string(statuses, status, status)
|
2284
2284
|
|
2285
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2285
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2286
2286
|
"""
|
2287
2287
|
:see: https://www.okcoin.com/docs-v5/en/#rest-api-funding-withdrawal
|
2288
2288
|
make a withdrawal
|
ccxt/okx.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.okx import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import PermissionDenied
|
@@ -363,9 +363,11 @@ class okx(Exchange, ImplicitAPI):
|
|
363
363
|
'tradingBot/grid/sub-orders': 1,
|
364
364
|
'tradingBot/grid/positions': 1,
|
365
365
|
'tradingBot/grid/ai-param': 1,
|
366
|
-
'tradingBot/
|
366
|
+
'tradingBot/signal/signals': 1,
|
367
367
|
'tradingBot/signal/orders-algo-details': 1,
|
368
|
+
'tradingBot/signal/orders-algo-history': 1,
|
368
369
|
'tradingBot/signal/positions': 1,
|
370
|
+
'tradingBot/signal/positions-history': 1,
|
369
371
|
'tradingBot/signal/sub-orders': 1,
|
370
372
|
'tradingBot/signal/event-history': 1,
|
371
373
|
'tradingBot/recurring/orders-algo-pending': 1,
|
@@ -485,6 +487,15 @@ class okx(Exchange, ImplicitAPI):
|
|
485
487
|
'tradingBot/grid/compute-margin-balance': 1,
|
486
488
|
'tradingBot/grid/margin-balance': 1,
|
487
489
|
'tradingBot/grid/min-investment': 1,
|
490
|
+
'tradingBot/signal/create-signal': 1,
|
491
|
+
'tradingBot/signal/order-algo': 1,
|
492
|
+
'tradingBot/signal/stop-order-algo': 1,
|
493
|
+
'tradingBot/signal/margin-balance': 1,
|
494
|
+
'tradingBot/signal/amendTPSL': 1,
|
495
|
+
'tradingBot/signal/set-instruments': 1,
|
496
|
+
'tradingBot/signal/close-position': 1,
|
497
|
+
'tradingBot/signal/sub-order': 1,
|
498
|
+
'tradingBot/signal/cancel-sub-order': 1,
|
488
499
|
'tradingBot/recurring/order-algo': 1,
|
489
500
|
'tradingBot/recurring/amend-order-algo': 1,
|
490
501
|
'tradingBot/recurring/stop-order-algo': 1,
|
@@ -1504,8 +1515,8 @@ class okx(Exchange, ImplicitAPI):
|
|
1504
1515
|
# "msg": ""
|
1505
1516
|
# }
|
1506
1517
|
#
|
1507
|
-
|
1508
|
-
return self.parse_markets(
|
1518
|
+
dataResponse = self.safe_value(response, 'data', [])
|
1519
|
+
return self.parse_markets(dataResponse)
|
1509
1520
|
|
1510
1521
|
def safe_network(self, networkId):
|
1511
1522
|
networksById = {
|
@@ -2468,7 +2479,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2468
2479
|
params['tgtCcy'] = 'quote_ccy'
|
2469
2480
|
return self.create_order(symbol, 'market', 'sell', cost, None, params)
|
2470
2481
|
|
2471
|
-
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2482
|
+
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
2472
2483
|
market = self.market(symbol)
|
2473
2484
|
request = {
|
2474
2485
|
'instId': market['id'],
|
@@ -2672,7 +2683,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2672
2683
|
params = self.omit(params, ['clOrdId', 'clientOrderId'])
|
2673
2684
|
return self.extend(request, params)
|
2674
2685
|
|
2675
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2686
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
2676
2687
|
"""
|
2677
2688
|
create a trade order
|
2678
2689
|
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
|
@@ -2953,7 +2964,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2953
2964
|
:param string[]|str ids: order ids
|
2954
2965
|
:returns str[]: list of order ids
|
2955
2966
|
"""
|
2956
|
-
if isinstance(ids, str):
|
2967
|
+
if (ids is not None) and isinstance(ids, str):
|
2957
2968
|
return ids.split(',')
|
2958
2969
|
else:
|
2959
2970
|
return ids
|
@@ -3936,10 +3947,12 @@ class okx(Exchange, ImplicitAPI):
|
|
3936
3947
|
if symbol is not None:
|
3937
3948
|
market = self.market(symbol)
|
3938
3949
|
request['instId'] = market['id']
|
3950
|
+
if since is not None:
|
3951
|
+
request['begin'] = since
|
3939
3952
|
request, params = self.handle_until_option('end', request, params)
|
3940
3953
|
type, query = self.handle_market_type_and_params('fetchMyTrades', market, params)
|
3941
3954
|
request['instType'] = self.convert_to_instrument_type(type)
|
3942
|
-
if limit is not None:
|
3955
|
+
if (limit is not None) and (since is None): # limit = n, okx will return the n most recent results, instead of the n results after limit, so limit should only be sent when since is None
|
3943
3956
|
request['limit'] = limit # default 100, max 100
|
3944
3957
|
response = self.privateGetTradeFillsHistory(self.extend(request, query))
|
3945
3958
|
#
|
@@ -4363,7 +4376,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4363
4376
|
raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + network + ' deposit address for ' + code)
|
4364
4377
|
return result
|
4365
4378
|
|
4366
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
4379
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
4367
4380
|
"""
|
4368
4381
|
make a withdrawal
|
4369
4382
|
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
|
@@ -5104,7 +5117,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5104
5117
|
'takeProfitPrice': None,
|
5105
5118
|
})
|
5106
5119
|
|
5107
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
5120
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
5108
5121
|
"""
|
5109
5122
|
transfer currency internally between wallets on the same account
|
5110
5123
|
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
|
@@ -5609,7 +5622,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5609
5622
|
sorted = self.sort_by(result, 'timestamp')
|
5610
5623
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
5611
5624
|
|
5612
|
-
def set_leverage(self, leverage, symbol: Str = None, params={}):
|
5625
|
+
def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
5613
5626
|
"""
|
5614
5627
|
set the level of leverage for a market
|
5615
5628
|
:see: https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
|
@@ -6164,7 +6177,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6164
6177
|
'info': info,
|
6165
6178
|
}
|
6166
6179
|
|
6167
|
-
def borrow_cross_margin(self, code: str, amount, params={}):
|
6180
|
+
def borrow_cross_margin(self, code: str, amount: float, params={}):
|
6168
6181
|
"""
|
6169
6182
|
create a loan to borrow margin(need to be VIP 5 and above)
|
6170
6183
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
|
@@ -6717,6 +6730,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6717
6730
|
entryMarketId = self.safe_string(entry, 'instId')
|
6718
6731
|
if entryMarketId == marketId:
|
6719
6732
|
return self.parse_greeks(entry, market)
|
6733
|
+
return None
|
6720
6734
|
|
6721
6735
|
def parse_greeks(self, greeks, market: Market = None):
|
6722
6736
|
#
|
ccxt/onetrading.py
CHANGED
@@ -1179,7 +1179,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1179
1179
|
withdrawalHistory = self.safe_value(response, 'withdrawal_history', [])
|
1180
1180
|
return self.parse_transactions(withdrawalHistory, currency, since, limit, {'type': 'withdrawal'})
|
1181
1181
|
|
1182
|
-
def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1182
|
+
def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1183
1183
|
"""
|
1184
1184
|
make a withdrawal
|
1185
1185
|
:param str code: unified currency code
|
@@ -1443,7 +1443,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
1443
1443
|
}
|
1444
1444
|
return self.safe_string(timeInForces, timeInForce, timeInForce)
|
1445
1445
|
|
1446
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1446
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1447
1447
|
"""
|
1448
1448
|
create a trade order
|
1449
1449
|
:see: https://docs.onetrading.com/#create-order
|
ccxt/p2b.py
CHANGED
@@ -760,7 +760,7 @@ class p2b(Exchange, ImplicitAPI):
|
|
760
760
|
result[code] = account
|
761
761
|
return self.safe_balance(result)
|
762
762
|
|
763
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
763
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
764
764
|
"""
|
765
765
|
create a trade order
|
766
766
|
:see: https://github.com/P2B-team/p2b-api-docs/blob/master/api-doc.md#create-order
|
ccxt/paymium.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.paymium import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
|
9
|
+
from ccxt.base.types import Balances, Currency, Int, Market, TransferEntry, OrderBook, OrderSide, OrderType, Str, Ticker, Trade
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
@@ -366,7 +366,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
366
366
|
'network': None,
|
367
367
|
}
|
368
368
|
|
369
|
-
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
369
|
+
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
370
370
|
"""
|
371
371
|
create a trade order
|
372
372
|
:see: https://paymium.github.io/api-documentation/#tag/Order/paths/~1user~1orders/post
|
@@ -409,7 +409,7 @@ class paymium(Exchange, ImplicitAPI):
|
|
409
409
|
}
|
410
410
|
return self.privateDeleteUserOrdersUuidCancel(self.extend(request, params))
|
411
411
|
|
412
|
-
def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
412
|
+
def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
413
413
|
"""
|
414
414
|
transfer currency internally between wallets on the same account
|
415
415
|
:see: https://paymium.github.io/api-documentation/#tag/Transfer/paths/~1user~1email_transfers/post
|