ccxt 3.0.85__py2.py3-none-any.whl → 3.0.87__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/ace.py +2 -1
- ccxt/alpaca.py +2 -1
- ccxt/ascendex.py +2 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/ace.py +2 -1
- ccxt/async_support/alpaca.py +2 -1
- ccxt/async_support/ascendex.py +2 -1
- ccxt/async_support/base/exchange.py +6 -6
- ccxt/async_support/bequant.py +2 -1
- ccxt/async_support/bigone.py +2 -1
- ccxt/async_support/binance.py +4 -3
- ccxt/async_support/binancecoinm.py +2 -1
- ccxt/async_support/binanceus.py +2 -1
- ccxt/async_support/binanceusdm.py +2 -1
- ccxt/async_support/bit2c.py +2 -1
- ccxt/async_support/bitbank.py +2 -1
- ccxt/async_support/bitbay.py +2 -1
- ccxt/async_support/bitbns.py +2 -1
- ccxt/async_support/bitcoincom.py +2 -1
- ccxt/async_support/bitfinex.py +2 -1
- ccxt/async_support/bitfinex2.py +2 -1
- ccxt/async_support/bitflyer.py +2 -1
- ccxt/async_support/bitforex.py +2 -1
- ccxt/async_support/bitget.py +19 -3
- ccxt/async_support/bithumb.py +2 -1
- ccxt/async_support/bitmart.py +2 -1
- ccxt/async_support/bitmex.py +3 -2
- ccxt/async_support/bitopro.py +2 -1
- ccxt/async_support/bitpanda.py +2 -1
- ccxt/async_support/bitrue.py +3 -2
- ccxt/async_support/bitso.py +2 -1
- ccxt/async_support/bitstamp.py +2 -1
- ccxt/async_support/bitstamp1.py +2 -1
- ccxt/async_support/bittrex.py +2 -1
- ccxt/async_support/bitvavo.py +3 -2
- ccxt/async_support/bkex.py +2 -1
- ccxt/async_support/bl3p.py +2 -1
- ccxt/async_support/blockchaincom.py +2 -1
- ccxt/async_support/btcalpha.py +2 -1
- ccxt/async_support/btcbox.py +4 -3
- ccxt/async_support/btcex.py +2 -1
- ccxt/async_support/btcmarkets.py +2 -1
- ccxt/async_support/btctradeua.py +2 -1
- ccxt/async_support/btcturk.py +2 -1
- ccxt/async_support/bybit.py +2 -1
- ccxt/async_support/cex.py +2 -1
- ccxt/async_support/coinbase.py +2 -1
- ccxt/async_support/coinbaseprime.py +2 -1
- ccxt/async_support/coinbasepro.py +4 -3
- ccxt/async_support/coincheck.py +2 -1
- ccxt/async_support/coinex.py +3 -2
- ccxt/async_support/coinfalcon.py +2 -1
- ccxt/async_support/coinmate.py +2 -1
- ccxt/async_support/coinone.py +2 -1
- ccxt/async_support/coinsph.py +3 -2
- ccxt/async_support/coinspot.py +2 -1
- ccxt/async_support/cryptocom.py +2 -1
- ccxt/async_support/currencycom.py +2 -1
- ccxt/async_support/delta.py +2 -1
- ccxt/async_support/deribit.py +2 -1
- ccxt/async_support/digifinex.py +4 -3
- ccxt/async_support/exmo.py +2 -1
- ccxt/async_support/fmfwio.py +2 -1
- ccxt/async_support/gate.py +2 -1
- ccxt/async_support/gateio.py +2 -1
- ccxt/async_support/gemini.py +2 -1
- ccxt/async_support/hitbtc.py +2 -1
- ccxt/async_support/hitbtc3.py +2 -1
- ccxt/async_support/hollaex.py +2 -1
- ccxt/async_support/huobi.py +2 -1
- ccxt/async_support/huobijp.py +2 -1
- ccxt/async_support/huobipro.py +2 -1
- ccxt/async_support/idex.py +3 -2
- ccxt/async_support/independentreserve.py +2 -1
- ccxt/async_support/indodax.py +2 -1
- ccxt/async_support/kraken.py +2 -1
- ccxt/async_support/krakenfutures.py +2 -1
- ccxt/async_support/kucoin.py +3 -2
- ccxt/async_support/kucoinfutures.py +147 -8
- ccxt/async_support/kuna.py +2 -1
- ccxt/async_support/latoken.py +2 -1
- ccxt/async_support/lbank.py +2 -1
- ccxt/async_support/lbank2.py +2 -1
- ccxt/async_support/luno.py +2 -1
- ccxt/async_support/lykke.py +2 -1
- ccxt/async_support/mercado.py +2 -1
- ccxt/async_support/mexc.py +4 -1
- ccxt/async_support/mexc3.py +2 -1
- ccxt/async_support/ndax.py +2 -1
- ccxt/async_support/novadax.py +2 -1
- ccxt/async_support/oceanex.py +2 -1
- ccxt/async_support/okcoin.py +2 -1
- ccxt/async_support/okex.py +2 -1
- ccxt/async_support/okex5.py +2 -1
- ccxt/async_support/okx.py +5 -1
- ccxt/async_support/paymium.py +2 -1
- ccxt/async_support/phemex.py +3 -1
- ccxt/async_support/poloniex.py +3 -1
- ccxt/async_support/poloniexfutures.py +2 -1
- ccxt/async_support/probit.py +2 -1
- ccxt/async_support/stex.py +3 -2
- ccxt/async_support/tidex.py +2 -1
- ccxt/async_support/timex.py +2 -1
- ccxt/async_support/tokocrypto.py +3 -2
- ccxt/async_support/upbit.py +2 -1
- ccxt/async_support/wavesexchange.py +2 -1
- ccxt/async_support/wazirx.py +2 -1
- ccxt/async_support/whitebit.py +2 -1
- ccxt/async_support/woo.py +2 -1
- ccxt/async_support/xt.py +7 -2
- ccxt/async_support/yobit.py +2 -1
- ccxt/async_support/zaif.py +2 -1
- ccxt/async_support/zonda.py +2 -1
- ccxt/base/exchange.py +6 -74
- ccxt/base/types.py +24 -0
- ccxt/bequant.py +2 -1
- ccxt/bigone.py +2 -1
- ccxt/binance.py +4 -3
- ccxt/binancecoinm.py +2 -1
- ccxt/binanceus.py +2 -1
- ccxt/binanceusdm.py +2 -1
- ccxt/bit2c.py +2 -1
- ccxt/bitbank.py +2 -1
- ccxt/bitbay.py +2 -1
- ccxt/bitbns.py +2 -1
- ccxt/bitcoincom.py +2 -1
- ccxt/bitfinex.py +2 -1
- ccxt/bitfinex2.py +2 -1
- ccxt/bitflyer.py +2 -1
- ccxt/bitforex.py +2 -1
- ccxt/bitget.py +19 -3
- ccxt/bithumb.py +2 -1
- ccxt/bitmart.py +2 -1
- ccxt/bitmex.py +3 -2
- ccxt/bitopro.py +2 -1
- ccxt/bitpanda.py +2 -1
- ccxt/bitrue.py +3 -2
- ccxt/bitso.py +2 -1
- ccxt/bitstamp.py +2 -1
- ccxt/bitstamp1.py +2 -1
- ccxt/bittrex.py +2 -1
- ccxt/bitvavo.py +3 -2
- ccxt/bkex.py +2 -1
- ccxt/bl3p.py +2 -1
- ccxt/blockchaincom.py +2 -1
- ccxt/btcalpha.py +2 -1
- ccxt/btcbox.py +4 -3
- ccxt/btcex.py +2 -1
- ccxt/btcmarkets.py +2 -1
- ccxt/btctradeua.py +2 -1
- ccxt/btcturk.py +2 -1
- ccxt/bybit.py +2 -1
- ccxt/cex.py +2 -1
- ccxt/coinbase.py +2 -1
- ccxt/coinbaseprime.py +2 -1
- ccxt/coinbasepro.py +4 -3
- ccxt/coincheck.py +2 -1
- ccxt/coinex.py +3 -2
- ccxt/coinfalcon.py +2 -1
- ccxt/coinmate.py +2 -1
- ccxt/coinone.py +2 -1
- ccxt/coinsph.py +3 -2
- ccxt/coinspot.py +2 -1
- ccxt/cryptocom.py +2 -1
- ccxt/currencycom.py +2 -1
- ccxt/delta.py +2 -1
- ccxt/deribit.py +2 -1
- ccxt/digifinex.py +4 -3
- ccxt/exmo.py +2 -1
- ccxt/fmfwio.py +2 -1
- ccxt/gate.py +2 -1
- ccxt/gateio.py +2 -1
- ccxt/gemini.py +2 -1
- ccxt/hitbtc.py +2 -1
- ccxt/hitbtc3.py +2 -1
- ccxt/hollaex.py +2 -1
- ccxt/huobi.py +2 -1
- ccxt/huobijp.py +2 -1
- ccxt/huobipro.py +2 -1
- ccxt/idex.py +3 -2
- ccxt/independentreserve.py +2 -1
- ccxt/indodax.py +2 -1
- ccxt/kraken.py +2 -1
- ccxt/krakenfutures.py +2 -1
- ccxt/kucoin.py +3 -2
- ccxt/kucoinfutures.py +147 -8
- ccxt/kuna.py +2 -1
- ccxt/latoken.py +2 -1
- ccxt/lbank.py +2 -1
- ccxt/lbank2.py +2 -1
- ccxt/luno.py +2 -1
- ccxt/lykke.py +2 -1
- ccxt/mercado.py +2 -1
- ccxt/mexc.py +4 -1
- ccxt/mexc3.py +2 -1
- ccxt/ndax.py +2 -1
- ccxt/novadax.py +2 -1
- ccxt/oceanex.py +2 -1
- ccxt/okcoin.py +2 -1
- ccxt/okex.py +2 -1
- ccxt/okex5.py +2 -1
- ccxt/okx.py +5 -1
- ccxt/paymium.py +2 -1
- ccxt/phemex.py +3 -1
- ccxt/poloniex.py +3 -1
- ccxt/poloniexfutures.py +2 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/probit.py +2 -1
- ccxt/stex.py +3 -2
- ccxt/tidex.py +2 -1
- ccxt/timex.py +2 -1
- ccxt/tokocrypto.py +3 -2
- ccxt/upbit.py +2 -1
- ccxt/wavesexchange.py +2 -1
- ccxt/wazirx.py +2 -1
- ccxt/whitebit.py +2 -1
- ccxt/woo.py +2 -1
- ccxt/xt.py +7 -2
- ccxt/yobit.py +2 -1
- ccxt/zaif.py +2 -1
- ccxt/zonda.py +2 -1
- {ccxt-3.0.85.dist-info → ccxt-3.0.87.dist-info}/METADATA +4 -4
- ccxt-3.0.87.dist-info/RECORD +355 -0
- ccxt-3.0.85.dist-info/RECORD +0 -355
- {ccxt-3.0.85.dist-info → ccxt-3.0.87.dist-info}/WHEEL +0 -0
- {ccxt-3.0.85.dist-info → ccxt-3.0.87.dist-info}/top_level.txt +0 -0
ccxt/async_support/hitbtc3.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.hitbtc3 import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -26,7 +27,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
26
27
|
from ccxt.base.precise import Precise
|
27
28
|
|
28
29
|
|
29
|
-
class hitbtc3(Exchange):
|
30
|
+
class hitbtc3(Exchange, ImplicitAPI):
|
30
31
|
|
31
32
|
def describe(self):
|
32
33
|
return self.deep_extend(super(hitbtc3, self).describe(), {
|
ccxt/async_support/hollaex.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.hollaex import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -19,7 +20,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
19
20
|
from ccxt.base.precise import Precise
|
20
21
|
|
21
22
|
|
22
|
-
class hollaex(Exchange):
|
23
|
+
class hollaex(Exchange, ImplicitAPI):
|
23
24
|
|
24
25
|
def describe(self):
|
25
26
|
return self.deep_extend(super(hollaex, self).describe(), {
|
ccxt/async_support/huobi.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.huobi import ImplicitAPI
|
7
8
|
import asyncio
|
8
9
|
import hashlib
|
9
10
|
from ccxt.base.types import OrderSide
|
@@ -30,7 +31,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
30
31
|
from ccxt.base.precise import Precise
|
31
32
|
|
32
33
|
|
33
|
-
class huobi(Exchange):
|
34
|
+
class huobi(Exchange, ImplicitAPI):
|
34
35
|
|
35
36
|
def describe(self):
|
36
37
|
return self.deep_extend(super(huobi, self).describe(), {
|
ccxt/async_support/huobijp.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.huobijp import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -26,7 +27,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
26
27
|
from ccxt.base.precise import Precise
|
27
28
|
|
28
29
|
|
29
|
-
class huobijp(Exchange):
|
30
|
+
class huobijp(Exchange, ImplicitAPI):
|
30
31
|
|
31
32
|
def describe(self):
|
32
33
|
return self.deep_extend(super(huobijp, self).describe(), {
|
ccxt/async_support/huobipro.py
CHANGED
@@ -4,9 +4,10 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.huobi import huobi
|
7
|
+
from ccxt.abstract.huobipro import ImplicitAPI
|
7
8
|
|
8
9
|
|
9
|
-
class huobipro(huobi):
|
10
|
+
class huobipro(huobi, ImplicitAPI):
|
10
11
|
|
11
12
|
def describe(self):
|
12
13
|
# self is an alias for backward-compatibility
|
ccxt/async_support/idex.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.idex import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -25,7 +26,7 @@ from ccxt.base.decimal_to_precision import PAD_WITH_ZERO
|
|
25
26
|
from ccxt.base.precise import Precise
|
26
27
|
|
27
28
|
|
28
|
-
class idex(Exchange):
|
29
|
+
class idex(Exchange, ImplicitAPI):
|
29
30
|
|
30
31
|
def describe(self):
|
31
32
|
return self.deep_extend(super(idex, self).describe(), {
|
@@ -1579,7 +1580,7 @@ class idex(Exchange):
|
|
1579
1580
|
'fee': fee,
|
1580
1581
|
}
|
1581
1582
|
|
1582
|
-
def calculate_rate_limiter_cost(self, api, method, path, params, config={}
|
1583
|
+
def calculate_rate_limiter_cost(self, api, method, path, params, config={}):
|
1583
1584
|
hasApiKey = (self.apiKey is not None)
|
1584
1585
|
hasSecret = (self.secret is not None)
|
1585
1586
|
hasWalletAddress = (self.walletAddress is not None)
|
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.independentreserve import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -11,7 +12,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
11
12
|
from ccxt.base.precise import Precise
|
12
13
|
|
13
14
|
|
14
|
-
class independentreserve(Exchange):
|
15
|
+
class independentreserve(Exchange, ImplicitAPI):
|
15
16
|
|
16
17
|
def describe(self):
|
17
18
|
return self.deep_extend(super(independentreserve, self).describe(), {
|
ccxt/async_support/indodax.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.indodax import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -18,7 +19,7 @@ from ccxt.base.errors import AuthenticationError
|
|
18
19
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
19
20
|
|
20
21
|
|
21
|
-
class indodax(Exchange):
|
22
|
+
class indodax(Exchange, ImplicitAPI):
|
22
23
|
|
23
24
|
def describe(self):
|
24
25
|
return self.deep_extend(super(indodax, self).describe(), {
|
ccxt/async_support/kraken.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.kraken import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -31,7 +32,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
31
32
|
from ccxt.base.precise import Precise
|
32
33
|
|
33
34
|
|
34
|
-
class kraken(Exchange):
|
35
|
+
class kraken(Exchange, ImplicitAPI):
|
35
36
|
|
36
37
|
def describe(self):
|
37
38
|
return self.deep_extend(super(kraken, self).describe(), {
|
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.krakenfutures import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -26,7 +27,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
26
27
|
from ccxt.base.precise import Precise
|
27
28
|
|
28
29
|
|
29
|
-
class krakenfutures(Exchange):
|
30
|
+
class krakenfutures(Exchange, ImplicitAPI):
|
30
31
|
|
31
32
|
def describe(self):
|
32
33
|
return self.deep_extend(super(krakenfutures, self).describe(), {
|
ccxt/async_support/kucoin.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.kucoin import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
import math
|
9
10
|
import json
|
@@ -28,7 +29,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
28
29
|
from ccxt.base.precise import Precise
|
29
30
|
|
30
31
|
|
31
|
-
class kucoin(Exchange):
|
32
|
+
class kucoin(Exchange, ImplicitAPI):
|
32
33
|
|
33
34
|
def describe(self):
|
34
35
|
return self.deep_extend(super(kucoin, self).describe(), {
|
@@ -2946,7 +2947,7 @@ class kucoin(Exchange):
|
|
2946
2947
|
items = self.safe_value(data, 'items')
|
2947
2948
|
return self.parse_ledger(items, currency, since, limit)
|
2948
2949
|
|
2949
|
-
def calculate_rate_limiter_cost(self, api, method, path, params, config={}
|
2950
|
+
def calculate_rate_limiter_cost(self, api, method, path, params, config={}):
|
2950
2951
|
versions = self.safe_value(self.options, 'versions', {})
|
2951
2952
|
apiVersions = self.safe_value(versions, api, {})
|
2952
2953
|
methodVersions = self.safe_value(apiVersions, method, {})
|
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.kucoin import kucoin
|
7
|
+
from ccxt.abstract.kucoinfutures import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -23,7 +24,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
23
24
|
from ccxt.base.precise import Precise
|
24
25
|
|
25
26
|
|
26
|
-
class kucoinfutures(kucoin):
|
27
|
+
class kucoinfutures(kucoin, ImplicitAPI):
|
27
28
|
|
28
29
|
def describe(self):
|
29
30
|
return self.deep_extend(super(kucoinfutures, self).describe(), {
|
@@ -1280,6 +1281,8 @@ class kucoinfutures(kucoin):
|
|
1280
1281
|
async def fetch_orders_by_status(self, status, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
1281
1282
|
"""
|
1282
1283
|
fetches a list of orders placed on the exchange
|
1284
|
+
see https://docs.kucoin.com/futures/#get-order-list
|
1285
|
+
see https://docs.kucoin.com/futures/#get-untriggered-stop-order-list
|
1283
1286
|
:param str status: 'active' or 'closed', only 'active' is valid for stop orders
|
1284
1287
|
:param str|None symbol: unified symbol for the market to retrieve orders from
|
1285
1288
|
:param int|None since: timestamp in ms of the earliest order to retrieve
|
@@ -1314,6 +1317,57 @@ class kucoinfutures(kucoin):
|
|
1314
1317
|
request['endAt'] = until
|
1315
1318
|
method = 'futuresPrivateGetStopOrders' if stop else 'futuresPrivateGetOrders'
|
1316
1319
|
response = await getattr(self, method)(self.extend(request, params))
|
1320
|
+
#
|
1321
|
+
# {
|
1322
|
+
# "code": "200000",
|
1323
|
+
# "data": {
|
1324
|
+
# "currentPage": 1,
|
1325
|
+
# "pageSize": 50,
|
1326
|
+
# "totalNum": 4,
|
1327
|
+
# "totalPage": 1,
|
1328
|
+
# "items": [
|
1329
|
+
# {
|
1330
|
+
# "id": "64507d02921f1c0001ff6892",
|
1331
|
+
# "symbol": "XBTUSDTM",
|
1332
|
+
# "type": "market",
|
1333
|
+
# "side": "buy",
|
1334
|
+
# "price": null,
|
1335
|
+
# "size": 1,
|
1336
|
+
# "value": "27.992",
|
1337
|
+
# "dealValue": "27.992",
|
1338
|
+
# "dealSize": 1,
|
1339
|
+
# "stp": "",
|
1340
|
+
# "stop": "",
|
1341
|
+
# "stopPriceType": "",
|
1342
|
+
# "stopTriggered": False,
|
1343
|
+
# "stopPrice": null,
|
1344
|
+
# "timeInForce": "GTC",
|
1345
|
+
# "postOnly": False,
|
1346
|
+
# "hidden": False,
|
1347
|
+
# "iceberg": False,
|
1348
|
+
# "leverage": "17",
|
1349
|
+
# "forceHold": False,
|
1350
|
+
# "closeOrder": False,
|
1351
|
+
# "visibleSize": null,
|
1352
|
+
# "clientOid": null,
|
1353
|
+
# "remark": null,
|
1354
|
+
# "tags": null,
|
1355
|
+
# "isActive": False,
|
1356
|
+
# "cancelExist": False,
|
1357
|
+
# "createdAt": 1682996482000,
|
1358
|
+
# "updatedAt": 1682996483062,
|
1359
|
+
# "endAt": 1682996483062,
|
1360
|
+
# "orderTime": 1682996482953900677,
|
1361
|
+
# "settleCurrency": "USDT",
|
1362
|
+
# "status": "done",
|
1363
|
+
# "filledValue": "27.992",
|
1364
|
+
# "filledSize": 1,
|
1365
|
+
# "reduceOnly": False
|
1366
|
+
# }
|
1367
|
+
# ]
|
1368
|
+
# }
|
1369
|
+
# }
|
1370
|
+
#
|
1317
1371
|
responseData = self.safe_value(response, 'data', {})
|
1318
1372
|
orders = self.safe_value(responseData, 'items', [])
|
1319
1373
|
return self.parse_orders(orders, market, since, limit)
|
@@ -1321,6 +1375,7 @@ class kucoinfutures(kucoin):
|
|
1321
1375
|
async def fetch_closed_orders(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
1322
1376
|
"""
|
1323
1377
|
fetches information on multiple closed orders made by the user
|
1378
|
+
see https://docs.kucoin.com/futures/#get-order-list
|
1324
1379
|
:param str|None symbol: unified market symbol of the market orders were made in
|
1325
1380
|
:param int|None since: the earliest time in ms to fetch orders for
|
1326
1381
|
:param int|None limit: the maximum number of orde structures to retrieve
|
@@ -1335,6 +1390,7 @@ class kucoinfutures(kucoin):
|
|
1335
1390
|
async def fetch_order(self, id=None, symbol: Optional[str] = None, params={}):
|
1336
1391
|
"""
|
1337
1392
|
fetches information on an order made by the user
|
1393
|
+
see https://docs.kucoin.com/futures/#get-details-of-a-single-order
|
1338
1394
|
:param str|None symbol: unified symbol of the market the order was made in
|
1339
1395
|
:param dict params: extra parameters specific to the kucoinfutures api endpoint
|
1340
1396
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1352,11 +1408,96 @@ class kucoinfutures(kucoin):
|
|
1352
1408
|
else:
|
1353
1409
|
request['orderId'] = id
|
1354
1410
|
response = await getattr(self, method)(self.extend(request, params))
|
1411
|
+
#
|
1412
|
+
# {
|
1413
|
+
# "code": "200000",
|
1414
|
+
# "data": {
|
1415
|
+
# "id": "64507d02921f1c0001ff6892",
|
1416
|
+
# "symbol": "XBTUSDTM",
|
1417
|
+
# "type": "market",
|
1418
|
+
# "side": "buy",
|
1419
|
+
# "price": null,
|
1420
|
+
# "size": 1,
|
1421
|
+
# "value": "27.992",
|
1422
|
+
# "dealValue": "27.992",
|
1423
|
+
# "dealSize": 1,
|
1424
|
+
# "stp": "",
|
1425
|
+
# "stop": "",
|
1426
|
+
# "stopPriceType": "",
|
1427
|
+
# "stopTriggered": False,
|
1428
|
+
# "stopPrice": null,
|
1429
|
+
# "timeInForce": "GTC",
|
1430
|
+
# "postOnly": False,
|
1431
|
+
# "hidden": False,
|
1432
|
+
# "iceberg": False,
|
1433
|
+
# "leverage": "17",
|
1434
|
+
# "forceHold": False,
|
1435
|
+
# "closeOrder": False,
|
1436
|
+
# "visibleSize": null,
|
1437
|
+
# "clientOid": null,
|
1438
|
+
# "remark": null,
|
1439
|
+
# "tags": null,
|
1440
|
+
# "isActive": False,
|
1441
|
+
# "cancelExist": False,
|
1442
|
+
# "createdAt": 1682996482000,
|
1443
|
+
# "updatedAt": 1682996483000,
|
1444
|
+
# "endAt": 1682996483000,
|
1445
|
+
# "orderTime": 1682996482953900677,
|
1446
|
+
# "settleCurrency": "USDT",
|
1447
|
+
# "status": "done",
|
1448
|
+
# "filledSize": 1,
|
1449
|
+
# "filledValue": "27.992",
|
1450
|
+
# "reduceOnly": False
|
1451
|
+
# }
|
1452
|
+
# }
|
1453
|
+
#
|
1355
1454
|
market = self.market(symbol) if (symbol is not None) else None
|
1356
1455
|
responseData = self.safe_value(response, 'data')
|
1357
1456
|
return self.parse_order(responseData, market)
|
1358
1457
|
|
1359
1458
|
def parse_order(self, order, market=None):
|
1459
|
+
#
|
1460
|
+
# fetchOrder, fetchOrdersByStatus
|
1461
|
+
#
|
1462
|
+
# {
|
1463
|
+
# "id": "64507d02921f1c0001ff6892",
|
1464
|
+
# "symbol": "XBTUSDTM",
|
1465
|
+
# "type": "market",
|
1466
|
+
# "side": "buy",
|
1467
|
+
# "price": null,
|
1468
|
+
# "size": 1,
|
1469
|
+
# "value": "27.992",
|
1470
|
+
# "dealValue": "27.992",
|
1471
|
+
# "dealSize": 1,
|
1472
|
+
# "stp": "",
|
1473
|
+
# "stop": "",
|
1474
|
+
# "stopPriceType": "",
|
1475
|
+
# "stopTriggered": False,
|
1476
|
+
# "stopPrice": null,
|
1477
|
+
# "timeInForce": "GTC",
|
1478
|
+
# "postOnly": False,
|
1479
|
+
# "hidden": False,
|
1480
|
+
# "iceberg": False,
|
1481
|
+
# "leverage": "17",
|
1482
|
+
# "forceHold": False,
|
1483
|
+
# "closeOrder": False,
|
1484
|
+
# "visibleSize": null,
|
1485
|
+
# "clientOid": null,
|
1486
|
+
# "remark": null,
|
1487
|
+
# "tags": null,
|
1488
|
+
# "isActive": False,
|
1489
|
+
# "cancelExist": False,
|
1490
|
+
# "createdAt": 1682996482000,
|
1491
|
+
# "updatedAt": 1682996483062,
|
1492
|
+
# "endAt": 1682996483062,
|
1493
|
+
# "orderTime": 1682996482953900677,
|
1494
|
+
# "settleCurrency": "USDT",
|
1495
|
+
# "status": "done",
|
1496
|
+
# "filledValue": "27.992",
|
1497
|
+
# "filledSize": 1,
|
1498
|
+
# "reduceOnly": False
|
1499
|
+
# }
|
1500
|
+
#
|
1360
1501
|
marketId = self.safe_string(order, 'symbol')
|
1361
1502
|
market = self.safe_market(marketId, market)
|
1362
1503
|
symbol = market['symbol']
|
@@ -1372,19 +1513,17 @@ class kucoinfutures(kucoin):
|
|
1372
1513
|
feeCurrency = self.safe_currency_code(feeCurrencyId)
|
1373
1514
|
feeCost = self.safe_number(order, 'fee')
|
1374
1515
|
amount = self.safe_string(order, 'size')
|
1375
|
-
filled = self.safe_string(order, '
|
1376
|
-
|
1377
|
-
leverage = self.safe_string(order, 'leverage')
|
1378
|
-
cost = Precise.string_div(rawCost, leverage)
|
1516
|
+
filled = self.safe_string(order, 'filledSize')
|
1517
|
+
cost = self.safe_string(order, 'filledValue')
|
1379
1518
|
average = None
|
1380
1519
|
if Precise.string_gt(filled, '0'):
|
1381
1520
|
contractSize = self.safe_string(market, 'contractSize')
|
1382
1521
|
if market['linear']:
|
1383
|
-
average = Precise.string_div(
|
1522
|
+
average = Precise.string_div(cost, Precise.string_mul(contractSize, filled))
|
1384
1523
|
else:
|
1385
|
-
average = Precise.string_div(Precise.string_mul(contractSize, filled),
|
1524
|
+
average = Precise.string_div(Precise.string_mul(contractSize, filled), cost)
|
1386
1525
|
# precision reported by their api is 8 d.p.
|
1387
|
-
# average = Precise.string_div(
|
1526
|
+
# average = Precise.string_div(cost, Precise.string_mul(filled, market['contractSize']))
|
1388
1527
|
# bool
|
1389
1528
|
isActive = self.safe_value(order, 'isActive', False)
|
1390
1529
|
cancelExist = self.safe_value(order, 'cancelExist', False)
|
ccxt/async_support/kuna.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.kuna import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -15,7 +16,7 @@ from ccxt.base.errors import NotSupported
|
|
15
16
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
16
17
|
|
17
18
|
|
18
|
-
class kuna(Exchange):
|
19
|
+
class kuna(Exchange, ImplicitAPI):
|
19
20
|
|
20
21
|
def describe(self):
|
21
22
|
return self.deep_extend(super(kuna, self).describe(), {
|
ccxt/async_support/latoken.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.latoken import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -23,7 +24,7 @@ from ccxt.base.errors import AuthenticationError
|
|
23
24
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
24
25
|
|
25
26
|
|
26
|
-
class latoken(Exchange):
|
27
|
+
class latoken(Exchange, ImplicitAPI):
|
27
28
|
|
28
29
|
def describe(self):
|
29
30
|
return self.deep_extend(super(latoken, self).describe(), {
|
ccxt/async_support/lbank.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.lbank import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -15,7 +16,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
15
16
|
from ccxt.base.precise import Precise
|
16
17
|
|
17
18
|
|
18
|
-
class lbank(Exchange):
|
19
|
+
class lbank(Exchange, ImplicitAPI):
|
19
20
|
|
20
21
|
def describe(self):
|
21
22
|
return self.deep_extend(super(lbank, self).describe(), {
|
ccxt/async_support/lbank2.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.lbank2 import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -24,7 +25,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
24
25
|
from ccxt.base.precise import Precise
|
25
26
|
|
26
27
|
|
27
|
-
class lbank2(Exchange):
|
28
|
+
class lbank2(Exchange, ImplicitAPI):
|
28
29
|
|
29
30
|
def describe(self):
|
30
31
|
return self.deep_extend(super(lbank2, self).describe(), {
|
ccxt/async_support/luno.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.luno import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -13,7 +14,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
13
14
|
from ccxt.base.precise import Precise
|
14
15
|
|
15
16
|
|
16
|
-
class luno(Exchange):
|
17
|
+
class luno(Exchange, ImplicitAPI):
|
17
18
|
|
18
19
|
def describe(self):
|
19
20
|
return self.deep_extend(super(luno, self).describe(), {
|
ccxt/async_support/lykke.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.lykke import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -17,7 +18,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
17
18
|
from ccxt.base.precise import Precise
|
18
19
|
|
19
20
|
|
20
|
-
class lykke(Exchange):
|
21
|
+
class lykke(Exchange, ImplicitAPI):
|
21
22
|
|
22
23
|
def describe(self):
|
23
24
|
return self.deep_extend(super(lykke, self).describe(), {
|
ccxt/async_support/mercado.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.mercado import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -13,7 +14,7 @@ from ccxt.base.errors import InvalidOrder
|
|
13
14
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
14
15
|
|
15
16
|
|
16
|
-
class mercado(Exchange):
|
17
|
+
class mercado(Exchange, ImplicitAPI):
|
17
18
|
|
18
19
|
def describe(self):
|
19
20
|
return self.deep_extend(super(mercado, self).describe(), {
|
ccxt/async_support/mexc.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.mexc import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -23,7 +24,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
23
24
|
from ccxt.base.precise import Precise
|
24
25
|
|
25
26
|
|
26
|
-
class mexc(Exchange):
|
27
|
+
class mexc(Exchange, ImplicitAPI):
|
27
28
|
|
28
29
|
def describe(self):
|
29
30
|
return self.deep_extend(super(mexc, self).describe(), {
|
@@ -2687,6 +2688,8 @@ class mexc(Exchange):
|
|
2687
2688
|
statuses = {
|
2688
2689
|
'BUY': 'buy',
|
2689
2690
|
'SELL': 'sell',
|
2691
|
+
'1': 'buy',
|
2692
|
+
'2': 'sell',
|
2690
2693
|
# contracts v1 : TODO
|
2691
2694
|
}
|
2692
2695
|
return self.safe_string(statuses, status, status)
|
ccxt/async_support/mexc3.py
CHANGED
@@ -4,9 +4,10 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.mexc import mexc
|
7
|
+
from ccxt.abstract.mexc3 import ImplicitAPI
|
7
8
|
|
8
9
|
|
9
|
-
class mexc3(mexc):
|
10
|
+
class mexc3(mexc, ImplicitAPI):
|
10
11
|
|
11
12
|
def describe(self):
|
12
13
|
return self.deep_extend(super(mexc3, self).describe(), {
|
ccxt/async_support/ndax.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.ndax import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
import json
|
9
10
|
from ccxt.base.types import OrderSide
|
@@ -17,7 +18,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
17
18
|
from ccxt.base.precise import Precise
|
18
19
|
|
19
20
|
|
20
|
-
class ndax(Exchange):
|
21
|
+
class ndax(Exchange, ImplicitAPI):
|
21
22
|
|
22
23
|
def describe(self):
|
23
24
|
return self.deep_extend(super(ndax, self).describe(), {
|
ccxt/async_support/novadax.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.novadax import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -25,7 +26,7 @@ from ccxt.base.errors import AuthenticationError
|
|
25
26
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
26
27
|
|
27
28
|
|
28
|
-
class novadax(Exchange):
|
29
|
+
class novadax(Exchange, ImplicitAPI):
|
29
30
|
|
30
31
|
def describe(self):
|
31
32
|
return self.deep_extend(super(novadax, self).describe(), {
|
ccxt/async_support/oceanex.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.oceanex import ImplicitAPI
|
7
8
|
from ccxt.base.types import OrderSide
|
8
9
|
from typing import Optional
|
9
10
|
from typing import List
|
@@ -18,7 +19,7 @@ from ccxt.base.errors import AuthenticationError
|
|
18
19
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
19
20
|
|
20
21
|
|
21
|
-
class oceanex(Exchange):
|
22
|
+
class oceanex(Exchange, ImplicitAPI):
|
22
23
|
|
23
24
|
def describe(self):
|
24
25
|
return self.deep_extend(super(oceanex, self).describe(), {
|
ccxt/async_support/okcoin.py
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
5
5
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
|
+
from ccxt.abstract.okcoin import ImplicitAPI
|
7
8
|
import hashlib
|
8
9
|
from ccxt.base.types import OrderSide
|
9
10
|
from typing import Optional
|
@@ -31,7 +32,7 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
|
|
31
32
|
from ccxt.base.precise import Precise
|
32
33
|
|
33
34
|
|
34
|
-
class okcoin(Exchange):
|
35
|
+
class okcoin(Exchange, ImplicitAPI):
|
35
36
|
|
36
37
|
def describe(self):
|
37
38
|
return self.deep_extend(super(okcoin, self).describe(), {
|