ccxt 4.4.37__py2.py3-none-any.whl → 4.4.38__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +1 -1
- ccxt/abstract/bingx.py +0 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/binance.py +0 -2
- ccxt/async_support/bingx.py +89 -8
- ccxt/async_support/bitget.py +2 -4
- ccxt/async_support/bithumb.py +1 -1
- ccxt/async_support/bitmart.py +160 -13
- ccxt/async_support/bybit.py +3 -2
- ccxt/async_support/kucoin.py +75 -2
- ccxt/async_support/kucoinfutures.py +92 -5
- ccxt/async_support/ndax.py +5 -1
- ccxt/async_support/okx.py +0 -1
- ccxt/async_support/probit.py +3 -1
- ccxt/base/exchange.py +5 -2
- ccxt/binance.py +0 -2
- ccxt/bingx.py +89 -8
- ccxt/bitget.py +2 -4
- ccxt/bithumb.py +1 -1
- ccxt/bitmart.py +160 -13
- ccxt/bybit.py +3 -2
- ccxt/kucoin.py +75 -2
- ccxt/kucoinfutures.py +92 -5
- ccxt/ndax.py +5 -1
- ccxt/okx.py +0 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/probit.py +3 -1
- ccxt/test/tests_async.py +5 -1
- ccxt/test/tests_sync.py +5 -1
- {ccxt-4.4.37.dist-info → ccxt-4.4.38.dist-info}/METADATA +4 -4
- {ccxt-4.4.37.dist-info → ccxt-4.4.38.dist-info}/RECORD +35 -35
- {ccxt-4.4.37.dist-info → ccxt-4.4.38.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.37.dist-info → ccxt-4.4.38.dist-info}/WHEEL +0 -0
- {ccxt-4.4.37.dist-info → ccxt-4.4.38.dist-info}/top_level.txt +0 -0
ccxt/bitmart.py
CHANGED
@@ -704,6 +704,151 @@ class bitmart(Exchange, ImplicitAPI):
|
|
704
704
|
'createMarketBuyOrderRequiresPrice': True,
|
705
705
|
'brokerId': 'CCXTxBitmart000',
|
706
706
|
},
|
707
|
+
'features': {
|
708
|
+
'default': {
|
709
|
+
'sandbox': False,
|
710
|
+
'createOrder': {
|
711
|
+
'marginMode': True,
|
712
|
+
'triggerPrice': False,
|
713
|
+
'triggerPriceType': None,
|
714
|
+
'triggerDirection': False,
|
715
|
+
'stopLossPrice': False,
|
716
|
+
'takeProfitPrice': False,
|
717
|
+
'attachedStopLossTakeProfit': None,
|
718
|
+
'timeInForce': {
|
719
|
+
'IOC': True,
|
720
|
+
'FOK': False,
|
721
|
+
'PO': True,
|
722
|
+
'GTD': False,
|
723
|
+
},
|
724
|
+
'hedged': False,
|
725
|
+
'trailing': False,
|
726
|
+
'marketBuyRequiresPrice': True,
|
727
|
+
'marketBuyByCost': True,
|
728
|
+
# exchange-supported features
|
729
|
+
# 'leverage': True,
|
730
|
+
# 'selfTradePrevention': False,
|
731
|
+
# 'twap': False,
|
732
|
+
# 'iceberg': False,
|
733
|
+
# 'oco': False,
|
734
|
+
},
|
735
|
+
'createOrders': {
|
736
|
+
'max': 10,
|
737
|
+
},
|
738
|
+
'fetchMyTrades': {
|
739
|
+
'marginMode': True,
|
740
|
+
'limit': 200,
|
741
|
+
'daysBack': None,
|
742
|
+
'untilDays': 99999,
|
743
|
+
},
|
744
|
+
'fetchOrder': {
|
745
|
+
'marginMode': False,
|
746
|
+
'trigger': False,
|
747
|
+
'trailing': False,
|
748
|
+
},
|
749
|
+
'fetchOpenOrders': {
|
750
|
+
'marginMode': True,
|
751
|
+
'limit': 200,
|
752
|
+
'trigger': False,
|
753
|
+
'trailing': False,
|
754
|
+
},
|
755
|
+
'fetchOrders': None,
|
756
|
+
'fetchClosedOrders': {
|
757
|
+
'marginMode': True,
|
758
|
+
'limit': 200,
|
759
|
+
'daysBackClosed': None,
|
760
|
+
'daysBackCanceled': None,
|
761
|
+
'untilDays': None,
|
762
|
+
'trigger': False,
|
763
|
+
'trailing': False,
|
764
|
+
},
|
765
|
+
'fetchOHLCV': {
|
766
|
+
'limit': 1000, # variable timespans for recent endpoint, 200 for historical
|
767
|
+
},
|
768
|
+
},
|
769
|
+
'forDerivatives': {
|
770
|
+
'extends': 'default',
|
771
|
+
'createOrder': {
|
772
|
+
'marginMode': True,
|
773
|
+
'triggerPrice': True,
|
774
|
+
'triggerPriceType': {
|
775
|
+
'last': True,
|
776
|
+
'mark': True,
|
777
|
+
'index': False,
|
778
|
+
},
|
779
|
+
'triggerDirection': True, # todo: implementation broken
|
780
|
+
'stopLossPrice': True,
|
781
|
+
'takeProfitPrice': True,
|
782
|
+
'attachedStopLossTakeProfit': {
|
783
|
+
'triggerPriceType': {
|
784
|
+
'last': True,
|
785
|
+
'mark': True,
|
786
|
+
'index': False,
|
787
|
+
},
|
788
|
+
'limitPrice': False,
|
789
|
+
},
|
790
|
+
'timeInForce': {
|
791
|
+
'IOC': True,
|
792
|
+
'FOK': True,
|
793
|
+
'PO': True,
|
794
|
+
'GTD': False,
|
795
|
+
},
|
796
|
+
'hedged': False,
|
797
|
+
'trailing': True,
|
798
|
+
'marketBuyRequiresPrice': True,
|
799
|
+
'marketBuyByCost': True,
|
800
|
+
# exchange-supported features
|
801
|
+
# 'selfTradePrevention': True,
|
802
|
+
# 'twap': False,
|
803
|
+
# 'iceberg': False,
|
804
|
+
# 'oco': False,
|
805
|
+
},
|
806
|
+
'fetchMyTrades': {
|
807
|
+
'marginMode': True,
|
808
|
+
'limit': None,
|
809
|
+
'daysBack': None,
|
810
|
+
'untilDays': 99999,
|
811
|
+
},
|
812
|
+
'fetchOrder': {
|
813
|
+
'marginMode': False,
|
814
|
+
'trigger': False,
|
815
|
+
'trailing': True,
|
816
|
+
},
|
817
|
+
'fetchOpenOrders': {
|
818
|
+
'marginMode': False,
|
819
|
+
'limit': 100,
|
820
|
+
'trigger': True,
|
821
|
+
'trailing': False,
|
822
|
+
},
|
823
|
+
'fetchClosedOrders': {
|
824
|
+
'marginMode': True,
|
825
|
+
'limit': 200,
|
826
|
+
'daysBackClosed': None,
|
827
|
+
'daysBackCanceled': None,
|
828
|
+
'untilDays': None,
|
829
|
+
'trigger': False,
|
830
|
+
'trailing': False,
|
831
|
+
},
|
832
|
+
'fetchOHLCV': {
|
833
|
+
'limit': 500,
|
834
|
+
},
|
835
|
+
},
|
836
|
+
'spot': {
|
837
|
+
'extends': 'default',
|
838
|
+
},
|
839
|
+
'swap': {
|
840
|
+
'linear': {
|
841
|
+
'extends': 'forDerivatives',
|
842
|
+
},
|
843
|
+
'inverse': {
|
844
|
+
'extends': 'forDerivatives',
|
845
|
+
},
|
846
|
+
},
|
847
|
+
'future': {
|
848
|
+
'linear': None,
|
849
|
+
'inverse': None,
|
850
|
+
},
|
851
|
+
},
|
707
852
|
})
|
708
853
|
|
709
854
|
def fetch_time(self, params={}):
|
@@ -1906,10 +2051,11 @@ class bitmart(Exchange, ImplicitAPI):
|
|
1906
2051
|
if marginMode == 'isolated':
|
1907
2052
|
request['orderMode'] = 'iso_margin'
|
1908
2053
|
options = self.safe_dict(self.options, 'fetchMyTrades', {})
|
1909
|
-
|
2054
|
+
maxLimit = 200
|
2055
|
+
defaultLimit = self.safe_integer(options, 'limit', maxLimit)
|
1910
2056
|
if limit is None:
|
1911
2057
|
limit = defaultLimit
|
1912
|
-
request['limit'] = limit
|
2058
|
+
request['limit'] = min(limit, maxLimit)
|
1913
2059
|
if since is not None:
|
1914
2060
|
request['startTime'] = since
|
1915
2061
|
if until is not None:
|
@@ -2549,8 +2695,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
2549
2695
|
"""
|
2550
2696
|
@ignore
|
2551
2697
|
create a trade order
|
2552
|
-
https://developer-pro.bitmart.com/en/
|
2553
|
-
https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
|
2698
|
+
https://developer-pro.bitmart.com/en/futuresv2/#submit-order-signed
|
2554
2699
|
https://developer-pro.bitmart.com/en/futuresv2/#submit-plan-order-signed
|
2555
2700
|
https://developer-pro.bitmart.com/en/futuresv2/#submit-tp-or-sl-order-signed
|
2556
2701
|
:param str symbol: unified symbol of the market to create an order in
|
@@ -2996,12 +3141,12 @@ class bitmart(Exchange, ImplicitAPI):
|
|
2996
3141
|
if symbol is not None:
|
2997
3142
|
market = self.market(symbol)
|
2998
3143
|
request['symbol'] = market['id']
|
2999
|
-
if limit is not None:
|
3000
|
-
request['limit'] = limit
|
3001
3144
|
type = None
|
3002
3145
|
response = None
|
3003
3146
|
type, params = self.handle_market_type_and_params('fetchOpenOrders', market, params)
|
3004
3147
|
if type == 'spot':
|
3148
|
+
if limit is not None:
|
3149
|
+
request['limit'] = min(limit, 200)
|
3005
3150
|
marginMode = None
|
3006
3151
|
marginMode, params = self.handle_margin_mode_and_params('fetchOpenOrders', params)
|
3007
3152
|
if marginMode == 'isolated':
|
@@ -3014,9 +3159,11 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3014
3159
|
request['endTime'] = until
|
3015
3160
|
response = self.privatePostSpotV4QueryOpenOrders(self.extend(request, params))
|
3016
3161
|
elif type == 'swap':
|
3017
|
-
|
3162
|
+
if limit is not None:
|
3163
|
+
request['limit'] = min(limit, 100)
|
3164
|
+
isTrigger = self.safe_bool_2(params, 'stop', 'trigger')
|
3018
3165
|
params = self.omit(params, ['stop', 'trigger'])
|
3019
|
-
if
|
3166
|
+
if isTrigger:
|
3020
3167
|
response = self.privateGetContractPrivateCurrentPlanOrder(self.extend(request, params))
|
3021
3168
|
else:
|
3022
3169
|
trailing = self.safe_bool(params, 'trailing', False)
|
@@ -3113,12 +3260,8 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3113
3260
|
if type != 'spot':
|
3114
3261
|
if symbol is None:
|
3115
3262
|
raise ArgumentsRequired(self.id + ' fetchClosedOrders() requires a symbol argument')
|
3116
|
-
marginMode = None
|
3117
|
-
marginMode, params = self.handle_margin_mode_and_params('fetchClosedOrders', params)
|
3118
|
-
if marginMode == 'isolated':
|
3119
|
-
request['orderMode'] = 'iso_margin'
|
3120
|
-
startTimeKey = 'startTime' if (type == 'spot') else 'start_time'
|
3121
3263
|
if since is not None:
|
3264
|
+
startTimeKey = 'startTime' if (type == 'spot') else 'start_time'
|
3122
3265
|
request[startTimeKey] = since
|
3123
3266
|
endTimeKey = 'endTime' if (type == 'spot') else 'end_time'
|
3124
3267
|
until = self.safe_integer_2(params, 'until', endTimeKey)
|
@@ -3127,6 +3270,10 @@ class bitmart(Exchange, ImplicitAPI):
|
|
3127
3270
|
request[endTimeKey] = until
|
3128
3271
|
response = None
|
3129
3272
|
if type == 'spot':
|
3273
|
+
marginMode = None
|
3274
|
+
marginMode, params = self.handle_margin_mode_and_params('fetchClosedOrders', params)
|
3275
|
+
if marginMode == 'isolated':
|
3276
|
+
request['orderMode'] = 'iso_margin'
|
3130
3277
|
response = self.privatePostSpotV4QueryHistoryOrders(self.extend(request, params))
|
3131
3278
|
else:
|
3132
3279
|
response = self.privateGetContractPrivateOrderHistory(self.extend(request, params))
|
ccxt/bybit.py
CHANGED
@@ -676,6 +676,9 @@ class bybit(Exchange, ImplicitAPI):
|
|
676
676
|
'110071': ExchangeError, # Sorry, we're revamping the Unified Margin Account! Currently, new upgrades are not supported. If you have any questions, please contact our 24/7 customer support.
|
677
677
|
'110072': InvalidOrder, # OrderLinkedID is duplicate
|
678
678
|
'110073': ExchangeError, # Set margin mode failed
|
679
|
+
'110092': InvalidOrder, # expect Rising, but trigger_price[XXXXX] <= current[XXXXX]
|
680
|
+
'110093': InvalidOrder, # expect Falling, but trigger_price[XXXXX] >= current[XXXXX]
|
681
|
+
'110094': InvalidOrder, # Order notional value below the lower limit
|
679
682
|
'130006': InvalidOrder, # {"ret_code":130006,"ret_msg":"The number of contracts exceeds maximum limit allowed: too large","ext_code":"","ext_info":"","result":null,"time_now":"1658397095.099030","rate_limit_status":99,"rate_limit_reset_ms":1658397095097,"rate_limit":100}
|
680
683
|
'130021': InsufficientFunds, # {"ret_code":130021,"ret_msg":"orderfix price failed for CannotAffordOrderCost.","ext_code":"","ext_info":"","result":null,"time_now":"1644588250.204878","rate_limit_status":98,"rate_limit_reset_ms":1644588250200,"rate_limit":100} | {"ret_code":130021,"ret_msg":"oc_diff[1707966351], new_oc[1707966351] with ob[....]+AB[....]","ext_code":"","ext_info":"","result":null,"time_now":"1658395300.872766","rate_limit_status":99,"rate_limit_reset_ms":1658395300855,"rate_limit":100} caused issues/9149#issuecomment-1146559498
|
681
684
|
'130074': InvalidOrder, # {"ret_code":130074,"ret_msg":"expect Rising, but trigger_price[190000000] \u003c= current[211280000]??LastPrice","ext_code":"","ext_info":"","result":null,"time_now":"1655386638.067076","rate_limit_status":97,"rate_limit_reset_ms":1655386638065,"rate_limit":100}
|
@@ -1115,7 +1118,6 @@ class bybit(Exchange, ImplicitAPI):
|
|
1115
1118
|
'limitPrice': True,
|
1116
1119
|
},
|
1117
1120
|
'timeInForce': {
|
1118
|
-
'GTC': True,
|
1119
1121
|
'IOC': True,
|
1120
1122
|
'FOK': True,
|
1121
1123
|
'PO': True,
|
@@ -1177,7 +1179,6 @@ class bybit(Exchange, ImplicitAPI):
|
|
1177
1179
|
'limitPrice': True,
|
1178
1180
|
},
|
1179
1181
|
'timeInForce': {
|
1180
|
-
'GTC': True,
|
1181
1182
|
'IOC': True,
|
1182
1183
|
'FOK': True,
|
1183
1184
|
'PO': True,
|
ccxt/kucoin.py
CHANGED
@@ -927,6 +927,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
927
927
|
'TRUE': 'true',
|
928
928
|
'CS': 'cs',
|
929
929
|
'ORAI': 'orai',
|
930
|
+
'BASE': 'base',
|
930
931
|
# below will be uncommented after consensus
|
931
932
|
# 'BITCOINDIAMON': 'bcd',
|
932
933
|
# 'BITCOINGOLD': 'btg',
|
@@ -1002,6 +1003,74 @@ class kucoin(Exchange, ImplicitAPI):
|
|
1002
1003
|
'spot': 'TRADE',
|
1003
1004
|
},
|
1004
1005
|
},
|
1006
|
+
'features': {
|
1007
|
+
'spot': {
|
1008
|
+
'sandbox': False,
|
1009
|
+
'createOrder': {
|
1010
|
+
'marginMode': True,
|
1011
|
+
'triggerPrice': True,
|
1012
|
+
'triggerPriceType': None,
|
1013
|
+
'triggerDirection': False,
|
1014
|
+
'stopLossPrice': True,
|
1015
|
+
'takeProfitPrice': True,
|
1016
|
+
'attachedStopLossTakeProfit': None, # not supported
|
1017
|
+
'timeInForce': {
|
1018
|
+
'IOC': True,
|
1019
|
+
'FOK': True,
|
1020
|
+
'PO': True,
|
1021
|
+
'GTD': True,
|
1022
|
+
},
|
1023
|
+
'hedged': False,
|
1024
|
+
'trailing': False,
|
1025
|
+
# exchange-supported features
|
1026
|
+
# 'iceberg': True,
|
1027
|
+
# 'selfTradePrevention': True,
|
1028
|
+
# 'twap': False,
|
1029
|
+
# 'oco': False,
|
1030
|
+
},
|
1031
|
+
'createOrders': {
|
1032
|
+
'max': 5,
|
1033
|
+
},
|
1034
|
+
'fetchMyTrades': {
|
1035
|
+
'marginMode': True,
|
1036
|
+
'limit': None,
|
1037
|
+
'daysBack': None,
|
1038
|
+
'untilDays': 7, # per implementation comments
|
1039
|
+
},
|
1040
|
+
'fetchOrder': {
|
1041
|
+
'marginMode': False,
|
1042
|
+
'trigger': True,
|
1043
|
+
'trailing': False,
|
1044
|
+
},
|
1045
|
+
'fetchOpenOrders': {
|
1046
|
+
'marginMode': True,
|
1047
|
+
'limit': 500,
|
1048
|
+
'trigger': True,
|
1049
|
+
'trailing': False,
|
1050
|
+
},
|
1051
|
+
'fetchOrders': None,
|
1052
|
+
'fetchClosedOrders': {
|
1053
|
+
'marginMode': True,
|
1054
|
+
'limit': 500,
|
1055
|
+
'daysBackClosed': None,
|
1056
|
+
'daysBackCanceled': None,
|
1057
|
+
'untilDays': 7,
|
1058
|
+
'trigger': True,
|
1059
|
+
'trailing': False,
|
1060
|
+
},
|
1061
|
+
'fetchOHLCV': {
|
1062
|
+
'limit': 1500,
|
1063
|
+
},
|
1064
|
+
},
|
1065
|
+
'swap': {
|
1066
|
+
'linear': None,
|
1067
|
+
'inverse': None,
|
1068
|
+
},
|
1069
|
+
'future': {
|
1070
|
+
'linear': None,
|
1071
|
+
'inverse': None,
|
1072
|
+
},
|
1073
|
+
},
|
1005
1074
|
})
|
1006
1075
|
|
1007
1076
|
def nonce(self):
|
@@ -2615,7 +2684,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2615
2684
|
self.load_markets()
|
2616
2685
|
lowercaseStatus = status.lower()
|
2617
2686
|
until = self.safe_integer(params, 'until')
|
2618
|
-
|
2687
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger', False)
|
2619
2688
|
hf = None
|
2620
2689
|
hf, params = self.handle_hf_and_params(params)
|
2621
2690
|
if hf and (symbol is None):
|
@@ -2641,7 +2710,7 @@ class kucoin(Exchange, ImplicitAPI):
|
|
2641
2710
|
request['endAt'] = until
|
2642
2711
|
request['tradeType'] = self.safe_string(self.options['marginModes'], marginMode, 'TRADE')
|
2643
2712
|
response = None
|
2644
|
-
if
|
2713
|
+
if trigger:
|
2645
2714
|
response = self.privateGetStopOrder(self.extend(request, query))
|
2646
2715
|
elif hf:
|
2647
2716
|
if lowercaseStatus == 'active':
|
@@ -3053,6 +3122,10 @@ class kucoin(Exchange, ImplicitAPI):
|
|
3053
3122
|
response = None
|
3054
3123
|
request, params = self.handle_until_option('endAt', request, params)
|
3055
3124
|
if hf:
|
3125
|
+
# does not return trades earlier than 2019-02-18T00:00:00Z
|
3126
|
+
if since is not None:
|
3127
|
+
# only returns trades up to one week after the since param
|
3128
|
+
request['startAt'] = since
|
3056
3129
|
response = self.privateGetHfFills(self.extend(request, params))
|
3057
3130
|
elif method == 'private_get_fills':
|
3058
3131
|
# does not return trades earlier than 2019-02-18T00:00:00Z
|
ccxt/kucoinfutures.py
CHANGED
@@ -370,6 +370,91 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
370
370
|
# 'code': 'BTC',
|
371
371
|
# },
|
372
372
|
},
|
373
|
+
'features': {
|
374
|
+
'spot': None,
|
375
|
+
'forDerivs': {
|
376
|
+
'sandbox': False,
|
377
|
+
'createOrder': {
|
378
|
+
'marginMode': True,
|
379
|
+
'triggerPrice': True,
|
380
|
+
'triggerPriceType': {
|
381
|
+
'last': True,
|
382
|
+
'mark': True,
|
383
|
+
'index': True,
|
384
|
+
},
|
385
|
+
'triggerDirection': True,
|
386
|
+
'stopLossPrice': True,
|
387
|
+
'takeProfitPrice': True,
|
388
|
+
'attachedStopLossTakeProfit': {
|
389
|
+
'triggerPrice': None,
|
390
|
+
'triggerPriceType': None,
|
391
|
+
'limitPrice': True,
|
392
|
+
},
|
393
|
+
'timeInForce': {
|
394
|
+
'IOC': True,
|
395
|
+
'FOK': False,
|
396
|
+
'PO': True,
|
397
|
+
'GTD': False,
|
398
|
+
},
|
399
|
+
'hedged': False,
|
400
|
+
'trailing': False,
|
401
|
+
# exchange-supported features
|
402
|
+
# 'iceberg': True,
|
403
|
+
# 'selfTradePrevention': True,
|
404
|
+
# 'twap': False,
|
405
|
+
# 'oco': False,
|
406
|
+
},
|
407
|
+
'createOrders': {
|
408
|
+
'max': 20,
|
409
|
+
},
|
410
|
+
'fetchMyTrades': {
|
411
|
+
'marginMode': True,
|
412
|
+
'limit': 1000,
|
413
|
+
'daysBack': None,
|
414
|
+
'untilDays': 7,
|
415
|
+
},
|
416
|
+
'fetchOrder': {
|
417
|
+
'marginMode': False,
|
418
|
+
'trigger': False,
|
419
|
+
'trailing': False,
|
420
|
+
},
|
421
|
+
'fetchOpenOrders': {
|
422
|
+
'marginMode': False,
|
423
|
+
'limit': 1000,
|
424
|
+
'trigger': True,
|
425
|
+
'trailing': False,
|
426
|
+
},
|
427
|
+
'fetchOrders': None,
|
428
|
+
'fetchClosedOrders': {
|
429
|
+
'marginMode': False,
|
430
|
+
'limit': 1000,
|
431
|
+
'daysBackClosed': None,
|
432
|
+
'daysBackCanceled': None,
|
433
|
+
'untilDays': None,
|
434
|
+
'trigger': True,
|
435
|
+
'trailing': False,
|
436
|
+
},
|
437
|
+
'fetchOHLCV': {
|
438
|
+
'limit': 500,
|
439
|
+
},
|
440
|
+
},
|
441
|
+
'swap': {
|
442
|
+
'linear': {
|
443
|
+
'extends': 'forDerivs',
|
444
|
+
},
|
445
|
+
'inverse': {
|
446
|
+
'extends': 'forDerivs',
|
447
|
+
},
|
448
|
+
},
|
449
|
+
'future': {
|
450
|
+
'linear': {
|
451
|
+
'extends': 'forDerivs',
|
452
|
+
},
|
453
|
+
'inverse': {
|
454
|
+
'extends': 'forDerivs',
|
455
|
+
},
|
456
|
+
},
|
457
|
+
},
|
373
458
|
})
|
374
459
|
|
375
460
|
def fetch_status(self, params={}):
|
@@ -1698,10 +1783,10 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1698
1783
|
request: dict = {}
|
1699
1784
|
if symbol is not None:
|
1700
1785
|
request['symbol'] = self.market_id(symbol)
|
1701
|
-
|
1786
|
+
trigger = self.safe_value_2(params, 'stop', 'trigger')
|
1702
1787
|
params = self.omit(params, ['stop', 'trigger'])
|
1703
1788
|
response = None
|
1704
|
-
if
|
1789
|
+
if trigger:
|
1705
1790
|
response = self.futuresPrivateDeleteStopOrders(self.extend(request, params))
|
1706
1791
|
else:
|
1707
1792
|
response = self.futuresPrivateDeleteOrders(self.extend(request, params))
|
@@ -1882,7 +1967,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1882
1967
|
paginate, params = self.handle_option_and_params(params, 'fetchOrdersByStatus', 'paginate')
|
1883
1968
|
if paginate:
|
1884
1969
|
return self.fetch_paginated_call_dynamic('fetchOrdersByStatus', symbol, since, limit, params)
|
1885
|
-
|
1970
|
+
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
1886
1971
|
until = self.safe_integer(params, 'until')
|
1887
1972
|
params = self.omit(params, ['stop', 'until', 'trigger'])
|
1888
1973
|
if status == 'closed':
|
@@ -1890,7 +1975,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1890
1975
|
elif status == 'open':
|
1891
1976
|
status = 'active'
|
1892
1977
|
request: dict = {}
|
1893
|
-
if not
|
1978
|
+
if not trigger:
|
1894
1979
|
request['status'] = status
|
1895
1980
|
elif status != 'active':
|
1896
1981
|
raise BadRequest(self.id + ' fetchOrdersByStatus() can only fetch untriggered stop orders')
|
@@ -1903,7 +1988,7 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
1903
1988
|
if until is not None:
|
1904
1989
|
request['endAt'] = until
|
1905
1990
|
response = None
|
1906
|
-
if
|
1991
|
+
if trigger:
|
1907
1992
|
response = self.futuresPrivateGetStopOrders(self.extend(request, params))
|
1908
1993
|
else:
|
1909
1994
|
response = self.futuresPrivateGetOrders(self.extend(request, params))
|
@@ -2510,6 +2595,8 @@ class kucoinfutures(kucoin, ImplicitAPI):
|
|
2510
2595
|
request['symbol'] = market['id']
|
2511
2596
|
if since is not None:
|
2512
2597
|
request['startAt'] = since
|
2598
|
+
if limit is not None:
|
2599
|
+
request['pageSize'] = min(1000, limit)
|
2513
2600
|
request, params = self.handle_until_option('endAt', request, params)
|
2514
2601
|
response = self.futuresPrivateGetFills(self.extend(request, params))
|
2515
2602
|
#
|
ccxt/ndax.py
CHANGED
@@ -1069,8 +1069,10 @@ class ndax(Exchange, ImplicitAPI):
|
|
1069
1069
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
1070
1070
|
self.load_markets()
|
1071
1071
|
self.load_accounts()
|
1072
|
-
defaultAccountId = self.safe_integer_2(self.options, 'accountId', 'AccountId'
|
1072
|
+
defaultAccountId = self.safe_integer_2(self.options, 'accountId', 'AccountId')
|
1073
1073
|
accountId = self.safe_integer_2(params, 'accountId', 'AccountId', defaultAccountId)
|
1074
|
+
if accountId is None:
|
1075
|
+
accountId = int(self.accounts[0]['id'])
|
1074
1076
|
params = self.omit(params, ['accountId', 'AccountId'])
|
1075
1077
|
request: dict = {
|
1076
1078
|
'omsId': omsId,
|
@@ -1348,6 +1350,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1348
1350
|
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1349
1351
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1350
1352
|
:param float [params.triggerPrice]: the price at which a trigger order would be triggered
|
1353
|
+
:param str [params.clientOrderId]: a unique id for the order
|
1351
1354
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1352
1355
|
"""
|
1353
1356
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
@@ -1578,6 +1581,7 @@ class ndax(Exchange, ImplicitAPI):
|
|
1578
1581
|
:param str id: order id
|
1579
1582
|
:param str symbol: unified symbol of the market the order was made in
|
1580
1583
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1584
|
+
:param str [params.clientOrderId]: a unique id for the order
|
1581
1585
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
1582
1586
|
"""
|
1583
1587
|
omsId = self.safe_integer(self.options, 'omsId', 1)
|
ccxt/okx.py
CHANGED
ccxt/pro/__init__.py
CHANGED
ccxt/probit.py
CHANGED
@@ -287,6 +287,8 @@ class probit(Exchange, ImplicitAPI):
|
|
287
287
|
base = self.safe_currency_code(baseId)
|
288
288
|
quote = self.safe_currency_code(quoteId)
|
289
289
|
closed = self.safe_bool(market, 'closed', False)
|
290
|
+
showInUI = self.safe_bool(market, 'show_in_ui', True)
|
291
|
+
active = not closed and showInUI
|
290
292
|
takerFeeRate = self.safe_string(market, 'taker_fee_rate')
|
291
293
|
taker = Precise.string_div(takerFeeRate, '100')
|
292
294
|
makerFeeRate = self.safe_string(market, 'maker_fee_rate')
|
@@ -306,7 +308,7 @@ class probit(Exchange, ImplicitAPI):
|
|
306
308
|
'swap': False,
|
307
309
|
'future': False,
|
308
310
|
'option': False,
|
309
|
-
'active':
|
311
|
+
'active': active,
|
310
312
|
'contract': False,
|
311
313
|
'linear': None,
|
312
314
|
'inverse': None,
|
ccxt/test/tests_async.py
CHANGED
@@ -924,6 +924,7 @@ class testMainClass:
|
|
924
924
|
'privateKey': '0xff3bdd43534543d421f05aec535965b5050ad6ac15345435345435453495e771',
|
925
925
|
'uid': 'uid',
|
926
926
|
'token': 'token',
|
927
|
+
'login': 'login',
|
927
928
|
'accountId': 'accountId',
|
928
929
|
'accounts': [{
|
929
930
|
'id': 'myAccount',
|
@@ -960,6 +961,9 @@ class testMainClass:
|
|
960
961
|
wallet_address = exchange.safe_string(exchange_data, 'walletAddress')
|
961
962
|
if wallet_address:
|
962
963
|
exchange.walletAddress = str(wallet_address)
|
964
|
+
accounts = exchange.safe_list(exchange_data, 'accounts')
|
965
|
+
if accounts:
|
966
|
+
exchange.accounts = accounts
|
963
967
|
# exchange.options = exchange.deepExtend (exchange.options, globalOptions); # custom options to be used in the tests
|
964
968
|
exchange.extend_exchange_options(global_options)
|
965
969
|
methods = exchange.safe_value(exchange_data, 'methods', {})
|
@@ -1090,7 +1094,7 @@ class testMainClass:
|
|
1090
1094
|
self.request_tests_failed = True
|
1091
1095
|
else:
|
1092
1096
|
self.response_tests_failed = True
|
1093
|
-
error_message = '[' + self.lang + '][STATIC_REQUEST]' +
|
1097
|
+
error_message = '[' + self.lang + '][STATIC_REQUEST]' + str(e)
|
1094
1098
|
dump('[TEST_FAILURE]' + error_message)
|
1095
1099
|
if self.request_tests_failed or self.response_tests_failed:
|
1096
1100
|
exit_script(1)
|
ccxt/test/tests_sync.py
CHANGED
@@ -921,6 +921,7 @@ class testMainClass:
|
|
921
921
|
'privateKey': '0xff3bdd43534543d421f05aec535965b5050ad6ac15345435345435453495e771',
|
922
922
|
'uid': 'uid',
|
923
923
|
'token': 'token',
|
924
|
+
'login': 'login',
|
924
925
|
'accountId': 'accountId',
|
925
926
|
'accounts': [{
|
926
927
|
'id': 'myAccount',
|
@@ -957,6 +958,9 @@ class testMainClass:
|
|
957
958
|
wallet_address = exchange.safe_string(exchange_data, 'walletAddress')
|
958
959
|
if wallet_address:
|
959
960
|
exchange.walletAddress = str(wallet_address)
|
961
|
+
accounts = exchange.safe_list(exchange_data, 'accounts')
|
962
|
+
if accounts:
|
963
|
+
exchange.accounts = accounts
|
960
964
|
# exchange.options = exchange.deepExtend (exchange.options, globalOptions); # custom options to be used in the tests
|
961
965
|
exchange.extend_exchange_options(global_options)
|
962
966
|
methods = exchange.safe_value(exchange_data, 'methods', {})
|
@@ -1087,7 +1091,7 @@ class testMainClass:
|
|
1087
1091
|
self.request_tests_failed = True
|
1088
1092
|
else:
|
1089
1093
|
self.response_tests_failed = True
|
1090
|
-
error_message = '[' + self.lang + '][STATIC_REQUEST]' +
|
1094
|
+
error_message = '[' + self.lang + '][STATIC_REQUEST]' + str(e)
|
1091
1095
|
dump('[TEST_FAILURE]' + error_message)
|
1092
1096
|
if self.request_tests_failed or self.response_tests_failed:
|
1093
1097
|
exit_script(1)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ccxt
|
3
|
-
Version: 4.4.
|
3
|
+
Version: 4.4.38
|
4
4
|
Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
|
5
5
|
Home-page: https://ccxt.com
|
6
6
|
Author: Igor Kroitor
|
@@ -275,13 +275,13 @@ console.log(version, Object.keys(exchanges));
|
|
275
275
|
|
276
276
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
277
277
|
|
278
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
279
|
-
* unpkg: https://unpkg.com/ccxt@4.4.
|
278
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.4.38/dist/ccxt.browser.min.js
|
279
|
+
* unpkg: https://unpkg.com/ccxt@4.4.38/dist/ccxt.browser.min.js
|
280
280
|
|
281
281
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
282
282
|
|
283
283
|
```HTML
|
284
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.
|
284
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.4.38/dist/ccxt.browser.min.js"></script>
|
285
285
|
```
|
286
286
|
|
287
287
|
Creates a global `ccxt` object:
|