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/async_support/kucoin.py
CHANGED
@@ -9,7 +9,7 @@ import asyncio
|
|
9
9
|
import hashlib
|
10
10
|
import math
|
11
11
|
import json
|
12
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
12
|
+
from ccxt.base.types import Balances, Currency, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
13
13
|
from typing import List
|
14
14
|
from ccxt.base.errors import ExchangeError
|
15
15
|
from ccxt.base.errors import PermissionDenied
|
@@ -1824,7 +1824,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1824
1824
|
raise ExchangeError(self.id + ' createOrder() - you should use either triggerPrice or stopLossPrice or takeProfitPrice')
|
1825
1825
|
return [triggerPrice, stopLossPrice, takeProfitPrice]
|
1826
1826
|
|
1827
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1827
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1828
1828
|
"""
|
1829
1829
|
Create an order on the exchange
|
1830
1830
|
:see: https://docs.kucoin.com/spot#place-a-new-order
|
@@ -2017,7 +2017,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2017
2017
|
data = self.safe_value(data, 'data', [])
|
2018
2018
|
return self.parse_orders(data)
|
2019
2019
|
|
2020
|
-
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2020
|
+
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
2021
2021
|
market = self.market(symbol)
|
2022
2022
|
# required param, cannot be used twice
|
2023
2023
|
clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId', self.uuid())
|
@@ -2912,7 +2912,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2912
2912
|
'tierBased': True,
|
2913
2913
|
}
|
2914
2914
|
|
2915
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2915
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
2916
2916
|
"""
|
2917
2917
|
make a withdrawal
|
2918
2918
|
:see: https://docs.kucoin.com/#apply-withdraw-2
|
@@ -3373,7 +3373,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3373
3373
|
returnType = result if isolated else self.safe_balance(result)
|
3374
3374
|
return returnType
|
3375
3375
|
|
3376
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
3376
|
+
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
3377
3377
|
"""
|
3378
3378
|
transfer currency internally between wallets on the same account
|
3379
3379
|
:see: https://docs.kucoin.com/#inner-transfer
|
@@ -3945,7 +3945,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3945
3945
|
'info': info,
|
3946
3946
|
}
|
3947
3947
|
|
3948
|
-
async def borrow_cross_margin(self, code: str, amount, params={}):
|
3948
|
+
async def borrow_cross_margin(self, code: str, amount: float, params={}):
|
3949
3949
|
"""
|
3950
3950
|
create a loan to borrow margin
|
3951
3951
|
:see: https://docs.kucoin.com/#1-margin-borrowing
|
@@ -3978,7 +3978,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3978
3978
|
data = self.safe_value(response, 'data', {})
|
3979
3979
|
return self.parse_margin_loan(data, currency)
|
3980
3980
|
|
3981
|
-
async def borrow_isolated_margin(self, symbol: str, code: str, amount, params={}):
|
3981
|
+
async def borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={}):
|
3982
3982
|
"""
|
3983
3983
|
create a loan to borrow margin
|
3984
3984
|
:see: https://docs.kucoin.com/#1-margin-borrowing
|
@@ -4150,7 +4150,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
4150
4150
|
endpart = ''
|
4151
4151
|
headers = headers if (headers is not None) else {}
|
4152
4152
|
url = self.urls['api'][api]
|
4153
|
-
if query:
|
4153
|
+
if not self.is_empty(query):
|
4154
4154
|
if (method == 'GET') or (method == 'DELETE'):
|
4155
4155
|
endpoint += '?' + self.rawencode(query)
|
4156
4156
|
else:
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
from ccxt.async_support.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
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1063
|
+
async 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
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1845
|
+
async 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/async_support/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
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
916
|
+
async 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
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1340
|
+
async 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/async_support/latoken.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.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
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1195
|
+
async 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
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1496
|
+
async 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/async_support/lbank.py
CHANGED
@@ -62,6 +62,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
62
62
|
'fetchClosedOrders': False,
|
63
63
|
'fetchCrossBorrowRate': False,
|
64
64
|
'fetchCrossBorrowRates': False,
|
65
|
+
'fetchDepositAddress': True,
|
65
66
|
'fetchDepositWithdrawFee': 'emulated',
|
66
67
|
'fetchDepositWithdrawFees': True,
|
67
68
|
'fetchFundingHistory': False,
|
@@ -346,7 +347,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
346
347
|
|
347
348
|
async def fetch_markets(self, params={}):
|
348
349
|
"""
|
349
|
-
retrieves data on all markets for
|
350
|
+
retrieves data on all markets for lbank
|
350
351
|
:see: https://www.lbank.com/en-US/docs/index.html#trading-pairs
|
351
352
|
:see: https://www.lbank.com/en-US/docs/contract.html#query-contract-information-list
|
352
353
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1244,7 +1245,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
1244
1245
|
params['createMarketBuyOrderRequiresPrice'] = False
|
1245
1246
|
return await self.create_order(symbol, 'market', 'buy', cost, None, params)
|
1246
1247
|
|
1247
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1248
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
1248
1249
|
"""
|
1249
1250
|
create a trade order
|
1250
1251
|
:see: https://www.lbank.com/en-US/docs/index.html#place-order
|
@@ -1904,7 +1905,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
1904
1905
|
'info': response,
|
1905
1906
|
}
|
1906
1907
|
|
1907
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1908
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}) -> Transaction:
|
1908
1909
|
"""
|
1909
1910
|
make a withdrawal
|
1910
1911
|
:see: https://www.lbank.com/en-US/docs/index.html#withdrawal
|
@@ -2167,7 +2168,7 @@ class lbank(Exchange, ImplicitAPI):
|
|
2167
2168
|
"""
|
2168
2169
|
* @deprecated
|
2169
2170
|
please use fetchDepositWithdrawFees instead
|
2170
|
-
:param str[]|None codes: not used by
|
2171
|
+
:param str[]|None codes: not used by lbank fetchTransactionFees()
|
2171
2172
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
2172
2173
|
:returns dict: a list of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>`
|
2173
2174
|
"""
|
ccxt/async_support/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
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
829
|
+
async 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/async_support/lykke.py
CHANGED
@@ -755,7 +755,7 @@ class lykke(Exchange, ImplicitAPI):
|
|
755
755
|
'trades': None,
|
756
756
|
}, market)
|
757
757
|
|
758
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
758
|
+
async 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
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1177
|
+
async 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/async_support/mercado.py
CHANGED
@@ -412,7 +412,7 @@ class mercado(Exchange, ImplicitAPI):
|
|
412
412
|
response = await self.privatePostGetAccountInfo(params)
|
413
413
|
return self.parse_balance(response)
|
414
414
|
|
415
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
415
|
+
async 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
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
594
|
+
async 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/async_support/mexc.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.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 await self.create_order(symbol, 'market', 'buy', cost, None, params)
|
2019
2020
|
|
2020
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2021
|
+
async 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 await self.modify_margin_helper(symbol, amount, 'ADD', params)
|
3700
3701
|
|
3701
|
-
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
3702
|
+
async 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
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
4586
|
+
async 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
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
4711
|
+
async 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/async_support/ndax.py
CHANGED
@@ -1274,7 +1274,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1274
1274
|
'trades': None,
|
1275
1275
|
}, market)
|
1276
1276
|
|
1277
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1277
|
+
async 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
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2176
|
+
async 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/async_support/novadax.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.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
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
718
|
+
async 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
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
1086
|
+
async 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
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1157
|
+
async 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/async_support/oceanex.py
CHANGED
@@ -594,7 +594,7 @@ class oceanex(Exchange, ImplicitAPI):
|
|
594
594
|
response = await self.privateGetMembersMe(params)
|
595
595
|
return self.parse_balance(response)
|
596
596
|
|
597
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
597
|
+
async 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/async_support/okcoin.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.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 await self.create_order(symbol, 'market', 'buy', cost, None, params)
|
1263
1263
|
|
1264
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1264
|
+
async 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
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
2146
|
+
async 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
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
2285
|
+
async 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/async_support/okx.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.okx import ImplicitAPI
|
8
8
|
import asyncio
|
9
9
|
import hashlib
|
10
|
-
from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
10
|
+
from ccxt.base.types import Balances, Currency, Greeks, Int, Market, Order, TransferEntry, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import PermissionDenied
|
@@ -364,9 +364,11 @@ class okx(Exchange, ImplicitAPI):
|
|
364
364
|
'tradingBot/grid/sub-orders': 1,
|
365
365
|
'tradingBot/grid/positions': 1,
|
366
366
|
'tradingBot/grid/ai-param': 1,
|
367
|
-
'tradingBot/
|
367
|
+
'tradingBot/signal/signals': 1,
|
368
368
|
'tradingBot/signal/orders-algo-details': 1,
|
369
|
+
'tradingBot/signal/orders-algo-history': 1,
|
369
370
|
'tradingBot/signal/positions': 1,
|
371
|
+
'tradingBot/signal/positions-history': 1,
|
370
372
|
'tradingBot/signal/sub-orders': 1,
|
371
373
|
'tradingBot/signal/event-history': 1,
|
372
374
|
'tradingBot/recurring/orders-algo-pending': 1,
|
@@ -486,6 +488,15 @@ class okx(Exchange, ImplicitAPI):
|
|
486
488
|
'tradingBot/grid/compute-margin-balance': 1,
|
487
489
|
'tradingBot/grid/margin-balance': 1,
|
488
490
|
'tradingBot/grid/min-investment': 1,
|
491
|
+
'tradingBot/signal/create-signal': 1,
|
492
|
+
'tradingBot/signal/order-algo': 1,
|
493
|
+
'tradingBot/signal/stop-order-algo': 1,
|
494
|
+
'tradingBot/signal/margin-balance': 1,
|
495
|
+
'tradingBot/signal/amendTPSL': 1,
|
496
|
+
'tradingBot/signal/set-instruments': 1,
|
497
|
+
'tradingBot/signal/close-position': 1,
|
498
|
+
'tradingBot/signal/sub-order': 1,
|
499
|
+
'tradingBot/signal/cancel-sub-order': 1,
|
489
500
|
'tradingBot/recurring/order-algo': 1,
|
490
501
|
'tradingBot/recurring/amend-order-algo': 1,
|
491
502
|
'tradingBot/recurring/stop-order-algo': 1,
|
@@ -1505,8 +1516,8 @@ class okx(Exchange, ImplicitAPI):
|
|
1505
1516
|
# "msg": ""
|
1506
1517
|
# }
|
1507
1518
|
#
|
1508
|
-
|
1509
|
-
return self.parse_markets(
|
1519
|
+
dataResponse = self.safe_value(response, 'data', [])
|
1520
|
+
return self.parse_markets(dataResponse)
|
1510
1521
|
|
1511
1522
|
def safe_network(self, networkId):
|
1512
1523
|
networksById = {
|
@@ -2469,7 +2480,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2469
2480
|
params['tgtCcy'] = 'quote_ccy'
|
2470
2481
|
return await self.create_order(symbol, 'market', 'sell', cost, None, params)
|
2471
2482
|
|
2472
|
-
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2483
|
+
def create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
2473
2484
|
market = self.market(symbol)
|
2474
2485
|
request = {
|
2475
2486
|
'instId': market['id'],
|
@@ -2673,7 +2684,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2673
2684
|
params = self.omit(params, ['clOrdId', 'clientOrderId'])
|
2674
2685
|
return self.extend(request, params)
|
2675
2686
|
|
2676
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
2687
|
+
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: float = None, params={}):
|
2677
2688
|
"""
|
2678
2689
|
create a trade order
|
2679
2690
|
:see: https://www.okx.com/docs-v5/en/#order-book-trading-trade-post-place-order
|
@@ -2954,7 +2965,7 @@ class okx(Exchange, ImplicitAPI):
|
|
2954
2965
|
:param string[]|str ids: order ids
|
2955
2966
|
:returns str[]: list of order ids
|
2956
2967
|
"""
|
2957
|
-
if isinstance(ids, str):
|
2968
|
+
if (ids is not None) and isinstance(ids, str):
|
2958
2969
|
return ids.split(',')
|
2959
2970
|
else:
|
2960
2971
|
return ids
|
@@ -3937,10 +3948,12 @@ class okx(Exchange, ImplicitAPI):
|
|
3937
3948
|
if symbol is not None:
|
3938
3949
|
market = self.market(symbol)
|
3939
3950
|
request['instId'] = market['id']
|
3951
|
+
if since is not None:
|
3952
|
+
request['begin'] = since
|
3940
3953
|
request, params = self.handle_until_option('end', request, params)
|
3941
3954
|
type, query = self.handle_market_type_and_params('fetchMyTrades', market, params)
|
3942
3955
|
request['instType'] = self.convert_to_instrument_type(type)
|
3943
|
-
if limit is not None:
|
3956
|
+
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
|
3944
3957
|
request['limit'] = limit # default 100, max 100
|
3945
3958
|
response = await self.privateGetTradeFillsHistory(self.extend(request, query))
|
3946
3959
|
#
|
@@ -4364,7 +4377,7 @@ class okx(Exchange, ImplicitAPI):
|
|
4364
4377
|
raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find ' + network + ' deposit address for ' + code)
|
4365
4378
|
return result
|
4366
4379
|
|
4367
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
4380
|
+
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
4368
4381
|
"""
|
4369
4382
|
make a withdrawal
|
4370
4383
|
:see: https://www.okx.com/docs-v5/en/#funding-account-rest-api-withdrawal
|
@@ -5105,7 +5118,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5105
5118
|
'takeProfitPrice': None,
|
5106
5119
|
})
|
5107
5120
|
|
5108
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
5121
|
+
async def transfer(self, code: str, amount: float, fromAccount, toAccount, params={}) -> TransferEntry:
|
5109
5122
|
"""
|
5110
5123
|
transfer currency internally between wallets on the same account
|
5111
5124
|
:see: https://www.okx.com/docs-v5/en/#rest-api-funding-funds-transfer
|
@@ -5610,7 +5623,7 @@ class okx(Exchange, ImplicitAPI):
|
|
5610
5623
|
sorted = self.sort_by(result, 'timestamp')
|
5611
5624
|
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
5612
5625
|
|
5613
|
-
async def set_leverage(self, leverage, symbol: Str = None, params={}):
|
5626
|
+
async def set_leverage(self, leverage: Int, symbol: Str = None, params={}):
|
5614
5627
|
"""
|
5615
5628
|
set the level of leverage for a market
|
5616
5629
|
:see: https://www.okx.com/docs-v5/en/#rest-api-account-set-leverage
|
@@ -6165,7 +6178,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6165
6178
|
'info': info,
|
6166
6179
|
}
|
6167
6180
|
|
6168
|
-
async def borrow_cross_margin(self, code: str, amount, params={}):
|
6181
|
+
async def borrow_cross_margin(self, code: str, amount: float, params={}):
|
6169
6182
|
"""
|
6170
6183
|
create a loan to borrow margin(need to be VIP 5 and above)
|
6171
6184
|
:see: https://www.okx.com/docs-v5/en/#trading-account-rest-api-vip-loans-borrow-and-repay
|
@@ -6718,6 +6731,7 @@ class okx(Exchange, ImplicitAPI):
|
|
6718
6731
|
entryMarketId = self.safe_string(entry, 'instId')
|
6719
6732
|
if entryMarketId == marketId:
|
6720
6733
|
return self.parse_greeks(entry, market)
|
6734
|
+
return None
|
6721
6735
|
|
6722
6736
|
def parse_greeks(self, greeks, market: Market = None):
|
6723
6737
|
#
|
ccxt/async_support/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
|
-
async def withdraw(self, code: str, amount, address, tag=None, params={}):
|
1182
|
+
async 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
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
1446
|
+
async 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/async_support/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
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
763
|
+
async 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/async_support/paymium.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.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
|
-
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount, price=None, params={}):
|
369
|
+
async 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 await self.privateDeleteUserOrdersUuidCancel(self.extend(request, params))
|
411
411
|
|
412
|
-
async def transfer(self, code: str, amount, fromAccount, toAccount, params={}):
|
412
|
+
async 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
|