ccxt 4.2.77__py2.py3-none-any.whl → 4.4.49__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccxt/__init__.py +36 -14
- ccxt/abstract/alpaca.py +4 -0
- ccxt/abstract/bigone.py +1 -1
- ccxt/abstract/binance.py +112 -48
- ccxt/abstract/binancecoinm.py +112 -48
- ccxt/abstract/binanceus.py +147 -83
- ccxt/abstract/binanceusdm.py +112 -48
- ccxt/abstract/bingx.py +133 -78
- ccxt/abstract/bitbank.py +5 -0
- ccxt/abstract/bitfinex.py +136 -65
- ccxt/abstract/bitfinex1.py +69 -0
- ccxt/abstract/bitflyer.py +1 -0
- ccxt/abstract/bitget.py +8 -1
- ccxt/abstract/bitmart.py +13 -1
- ccxt/abstract/bitopro.py +1 -0
- ccxt/abstract/bitpanda.py +0 -12
- ccxt/abstract/bitrue.py +3 -3
- ccxt/abstract/bitstamp.py +26 -3
- ccxt/abstract/blofin.py +24 -0
- ccxt/abstract/btcbox.py +1 -0
- ccxt/abstract/bybit.py +29 -14
- ccxt/abstract/cex.py +28 -29
- ccxt/abstract/coinbase.py +6 -0
- ccxt/abstract/coinbaseadvanced.py +94 -0
- ccxt/abstract/{coinbasepro.py → coinbaseexchange.py} +1 -0
- ccxt/abstract/coinbaseinternational.py +1 -1
- ccxt/abstract/coincatch.py +94 -0
- ccxt/abstract/coinex.py +233 -123
- ccxt/abstract/coinmetro.py +1 -0
- ccxt/abstract/cryptocom.py +14 -0
- ccxt/abstract/defx.py +69 -0
- ccxt/abstract/deribit.py +1 -0
- ccxt/abstract/digifinex.py +1 -0
- ccxt/abstract/ellipx.py +25 -0
- ccxt/abstract/gate.py +20 -0
- ccxt/abstract/gateio.py +20 -0
- ccxt/abstract/gemini.py +1 -0
- ccxt/abstract/hashkey.py +67 -0
- ccxt/abstract/hyperliquid.py +1 -1
- ccxt/abstract/independentreserve.py +6 -0
- ccxt/abstract/kraken.py +4 -3
- ccxt/abstract/krakenfutures.py +4 -0
- ccxt/abstract/kucoin.py +24 -0
- ccxt/abstract/kucoinfutures.py +34 -0
- ccxt/abstract/luno.py +2 -0
- ccxt/abstract/mexc.py +4 -0
- ccxt/abstract/myokx.py +340 -0
- ccxt/abstract/oceanex.py +5 -0
- ccxt/abstract/okx.py +30 -0
- ccxt/abstract/onetrading.py +0 -12
- ccxt/abstract/oxfun.py +34 -0
- ccxt/abstract/paradex.py +40 -0
- ccxt/abstract/phemex.py +1 -0
- ccxt/abstract/upbit.py +4 -0
- ccxt/abstract/vertex.py +19 -0
- ccxt/abstract/whitebit.py +31 -1
- ccxt/abstract/woo.py +6 -2
- ccxt/abstract/woofipro.py +119 -0
- ccxt/abstract/xt.py +153 -0
- ccxt/abstract/zonda.py +6 -0
- ccxt/ace.py +164 -60
- ccxt/alpaca.py +727 -63
- ccxt/ascendex.py +395 -249
- ccxt/async_support/__init__.py +36 -14
- ccxt/async_support/ace.py +164 -60
- ccxt/async_support/alpaca.py +727 -63
- ccxt/async_support/ascendex.py +396 -249
- ccxt/async_support/base/exchange.py +531 -155
- ccxt/async_support/base/ws/aiohttp_client.py +28 -5
- ccxt/async_support/base/ws/cache.py +3 -2
- ccxt/async_support/base/ws/client.py +26 -5
- ccxt/async_support/base/ws/fast_client.py +4 -3
- ccxt/async_support/base/ws/functions.py +1 -1
- ccxt/async_support/base/ws/future.py +40 -31
- ccxt/async_support/base/ws/order_book_side.py +3 -0
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/bigone.py +329 -202
- ccxt/async_support/binance.py +3030 -1087
- ccxt/async_support/binancecoinm.py +2 -1
- ccxt/async_support/binanceus.py +12 -1
- ccxt/async_support/binanceusdm.py +3 -1
- ccxt/async_support/bingx.py +3205 -937
- ccxt/async_support/bit2c.py +119 -38
- ccxt/async_support/bitbank.py +215 -76
- ccxt/async_support/bitbns.py +124 -53
- ccxt/async_support/bitfinex.py +3236 -1078
- ccxt/async_support/bitfinex1.py +1711 -0
- ccxt/async_support/bitflyer.py +238 -49
- ccxt/async_support/bitget.py +1525 -573
- ccxt/async_support/bithumb.py +199 -65
- ccxt/async_support/bitmart.py +1320 -435
- ccxt/async_support/bitmex.py +308 -111
- ccxt/async_support/bitopro.py +256 -96
- ccxt/async_support/bitrue.py +365 -233
- ccxt/async_support/bitso.py +201 -89
- ccxt/async_support/bitstamp.py +438 -269
- ccxt/async_support/bitteam.py +179 -73
- ccxt/async_support/bitvavo.py +180 -70
- ccxt/async_support/bl3p.py +92 -25
- ccxt/async_support/blockchaincom.py +193 -79
- ccxt/async_support/blofin.py +392 -148
- ccxt/async_support/btcalpha.py +161 -55
- ccxt/async_support/btcbox.py +250 -34
- ccxt/async_support/btcmarkets.py +232 -85
- ccxt/async_support/btcturk.py +159 -60
- ccxt/async_support/bybit.py +2231 -1193
- ccxt/async_support/cex.py +1409 -1329
- ccxt/async_support/coinbase.py +1454 -287
- ccxt/async_support/coinbaseadvanced.py +17 -0
- ccxt/async_support/{coinbasepro.py → coinbaseexchange.py} +233 -99
- ccxt/async_support/coinbaseinternational.py +428 -88
- ccxt/async_support/coincatch.py +5152 -0
- ccxt/async_support/coincheck.py +121 -38
- ccxt/async_support/coinex.py +4020 -3339
- ccxt/async_support/coinlist.py +273 -116
- ccxt/async_support/coinmate.py +204 -97
- ccxt/async_support/coinmetro.py +203 -110
- ccxt/async_support/coinone.py +142 -68
- ccxt/async_support/coinsph.py +223 -97
- ccxt/async_support/coinspot.py +137 -62
- ccxt/async_support/cryptocom.py +515 -185
- ccxt/async_support/currencycom.py +203 -85
- ccxt/async_support/defx.py +2066 -0
- ccxt/async_support/delta.py +404 -109
- ccxt/async_support/deribit.py +639 -323
- ccxt/async_support/digifinex.py +465 -233
- ccxt/async_support/ellipx.py +1887 -0
- ccxt/async_support/exmo.py +317 -128
- ccxt/async_support/gate.py +1472 -463
- ccxt/async_support/gemini.py +206 -84
- ccxt/async_support/hashkey.py +4164 -0
- ccxt/async_support/hitbtc.py +433 -178
- ccxt/async_support/hollaex.py +207 -83
- ccxt/async_support/htx.py +1095 -563
- ccxt/async_support/huobijp.py +178 -56
- ccxt/async_support/hyperliquid.py +1678 -292
- ccxt/async_support/idex.py +219 -95
- ccxt/async_support/independentreserve.py +300 -31
- ccxt/async_support/indodax.py +226 -62
- ccxt/async_support/kraken.py +871 -354
- ccxt/async_support/krakenfutures.py +324 -100
- ccxt/async_support/kucoin.py +917 -357
- ccxt/async_support/kucoinfutures.py +1004 -149
- ccxt/async_support/kuna.py +198 -107
- ccxt/async_support/latoken.py +199 -79
- ccxt/async_support/lbank.py +360 -113
- ccxt/async_support/luno.py +185 -62
- ccxt/async_support/lykke.py +168 -55
- ccxt/async_support/mercado.py +101 -29
- ccxt/async_support/mexc.py +995 -429
- ccxt/async_support/myokx.py +53 -0
- ccxt/async_support/ndax.py +234 -82
- ccxt/async_support/novadax.py +195 -75
- ccxt/async_support/oceanex.py +244 -59
- ccxt/async_support/okcoin.py +301 -165
- ccxt/async_support/okx.py +1776 -454
- ccxt/async_support/onetrading.py +198 -414
- ccxt/async_support/oxfun.py +2898 -0
- ccxt/async_support/p2b.py +142 -52
- ccxt/async_support/paradex.py +2085 -0
- ccxt/async_support/paymium.py +56 -32
- ccxt/async_support/phemex.py +572 -196
- ccxt/async_support/poloniex.py +218 -95
- ccxt/async_support/poloniexfutures.py +260 -92
- ccxt/async_support/probit.py +143 -110
- ccxt/async_support/timex.py +123 -70
- ccxt/async_support/tokocrypto.py +129 -93
- ccxt/async_support/tradeogre.py +39 -25
- ccxt/async_support/upbit.py +322 -113
- ccxt/async_support/vertex.py +2983 -0
- ccxt/async_support/wavesexchange.py +227 -173
- ccxt/async_support/wazirx.py +145 -65
- ccxt/async_support/whitebit.py +533 -138
- ccxt/async_support/woo.py +1137 -296
- ccxt/async_support/woofipro.py +2716 -0
- ccxt/async_support/xt.py +4628 -0
- ccxt/async_support/yobit.py +160 -92
- ccxt/async_support/zaif.py +80 -33
- ccxt/async_support/zonda.py +140 -69
- ccxt/base/errors.py +51 -20
- ccxt/base/exchange.py +1722 -480
- ccxt/base/precise.py +10 -0
- ccxt/base/types.py +223 -4
- ccxt/bequant.py +1 -1
- ccxt/bigone.py +329 -202
- ccxt/binance.py +3030 -1087
- ccxt/binancecoinm.py +2 -1
- ccxt/binanceus.py +12 -1
- ccxt/binanceusdm.py +3 -1
- ccxt/bingx.py +3205 -937
- ccxt/bit2c.py +119 -38
- ccxt/bitbank.py +215 -76
- ccxt/bitbns.py +124 -53
- ccxt/bitfinex.py +3235 -1078
- ccxt/bitfinex1.py +1710 -0
- ccxt/bitflyer.py +238 -49
- ccxt/bitget.py +1525 -573
- ccxt/bithumb.py +198 -65
- ccxt/bitmart.py +1320 -435
- ccxt/bitmex.py +308 -111
- ccxt/bitopro.py +256 -96
- ccxt/bitrue.py +365 -233
- ccxt/bitso.py +201 -89
- ccxt/bitstamp.py +438 -269
- ccxt/bitteam.py +179 -73
- ccxt/bitvavo.py +180 -70
- ccxt/bl3p.py +92 -25
- ccxt/blockchaincom.py +193 -79
- ccxt/blofin.py +392 -148
- ccxt/btcalpha.py +161 -55
- ccxt/btcbox.py +250 -34
- ccxt/btcmarkets.py +232 -85
- ccxt/btcturk.py +159 -60
- ccxt/bybit.py +2231 -1193
- ccxt/cex.py +1408 -1329
- ccxt/coinbase.py +1454 -287
- ccxt/coinbaseadvanced.py +17 -0
- ccxt/{coinbasepro.py → coinbaseexchange.py} +233 -99
- ccxt/coinbaseinternational.py +428 -88
- ccxt/coincatch.py +5152 -0
- ccxt/coincheck.py +121 -38
- ccxt/coinex.py +4020 -3339
- ccxt/coinlist.py +273 -116
- ccxt/coinmate.py +204 -97
- ccxt/coinmetro.py +203 -110
- ccxt/coinone.py +142 -68
- ccxt/coinsph.py +223 -97
- ccxt/coinspot.py +137 -62
- ccxt/cryptocom.py +515 -185
- ccxt/currencycom.py +203 -85
- ccxt/defx.py +2065 -0
- ccxt/delta.py +404 -109
- ccxt/deribit.py +639 -323
- ccxt/digifinex.py +465 -233
- ccxt/ellipx.py +1887 -0
- ccxt/exmo.py +317 -128
- ccxt/gate.py +1472 -463
- ccxt/gemini.py +206 -84
- ccxt/hashkey.py +4164 -0
- ccxt/hitbtc.py +433 -178
- ccxt/hollaex.py +207 -83
- ccxt/htx.py +1095 -563
- ccxt/huobijp.py +178 -56
- ccxt/hyperliquid.py +1677 -292
- ccxt/idex.py +219 -95
- ccxt/independentreserve.py +299 -31
- ccxt/indodax.py +226 -62
- ccxt/kraken.py +871 -354
- ccxt/krakenfutures.py +324 -100
- ccxt/kucoin.py +917 -357
- ccxt/kucoinfutures.py +1004 -149
- ccxt/kuna.py +198 -107
- ccxt/latoken.py +199 -79
- ccxt/lbank.py +360 -113
- ccxt/luno.py +185 -62
- ccxt/lykke.py +168 -55
- ccxt/mercado.py +101 -29
- ccxt/mexc.py +994 -429
- ccxt/myokx.py +53 -0
- ccxt/ndax.py +234 -82
- ccxt/novadax.py +195 -75
- ccxt/oceanex.py +244 -59
- ccxt/okcoin.py +301 -165
- ccxt/okx.py +1776 -454
- ccxt/onetrading.py +198 -414
- ccxt/oxfun.py +2897 -0
- ccxt/p2b.py +142 -52
- ccxt/paradex.py +2085 -0
- ccxt/paymium.py +56 -32
- ccxt/phemex.py +572 -196
- ccxt/poloniex.py +218 -95
- ccxt/poloniexfutures.py +260 -92
- ccxt/pro/__init__.py +29 -5
- ccxt/pro/alpaca.py +32 -17
- ccxt/pro/ascendex.py +62 -14
- ccxt/pro/bequant.py +4 -0
- ccxt/pro/binance.py +1596 -329
- ccxt/pro/binancecoinm.py +1 -0
- ccxt/pro/binanceus.py +2 -9
- ccxt/pro/binanceusdm.py +2 -0
- ccxt/pro/bingx.py +527 -134
- ccxt/pro/bitcoincom.py +4 -1
- ccxt/pro/bitfinex.py +731 -266
- ccxt/pro/bitfinex1.py +635 -0
- ccxt/pro/bitget.py +726 -357
- ccxt/pro/bithumb.py +380 -0
- ccxt/pro/bitmart.py +143 -39
- ccxt/pro/bitmex.py +199 -40
- ccxt/pro/bitopro.py +25 -13
- ccxt/pro/bitrue.py +31 -32
- ccxt/pro/bitstamp.py +7 -6
- ccxt/pro/bitvavo.py +203 -81
- ccxt/pro/blockchaincom.py +30 -17
- ccxt/pro/blofin.py +692 -0
- ccxt/pro/bybit.py +791 -82
- ccxt/pro/cex.py +99 -51
- ccxt/pro/coinbase.py +220 -30
- ccxt/{async_support/hitbtc3.py → pro/coinbaseadvanced.py} +5 -5
- ccxt/pro/{coinbasepro.py → coinbaseexchange.py} +19 -19
- ccxt/pro/coinbaseinternational.py +193 -30
- ccxt/pro/coincatch.py +1464 -0
- ccxt/pro/coincheck.py +11 -6
- ccxt/pro/coinex.py +965 -665
- ccxt/pro/coinone.py +17 -10
- ccxt/pro/cryptocom.py +446 -66
- ccxt/pro/currencycom.py +11 -10
- ccxt/pro/defx.py +832 -0
- ccxt/pro/deribit.py +167 -31
- ccxt/pro/exmo.py +252 -20
- ccxt/pro/gate.py +729 -64
- ccxt/pro/gemini.py +44 -26
- ccxt/pro/hashkey.py +802 -0
- ccxt/pro/hitbtc.py +208 -103
- ccxt/pro/hollaex.py +25 -9
- ccxt/pro/htx.py +83 -39
- ccxt/pro/huobijp.py +17 -16
- ccxt/pro/hyperliquid.py +502 -31
- ccxt/pro/idex.py +28 -13
- ccxt/pro/independentreserve.py +21 -16
- ccxt/pro/kraken.py +298 -51
- ccxt/pro/krakenfutures.py +166 -75
- ccxt/pro/kucoin.py +395 -77
- ccxt/pro/kucoinfutures.py +400 -99
- ccxt/pro/lbank.py +52 -31
- ccxt/pro/luno.py +12 -10
- ccxt/pro/mexc.py +400 -50
- ccxt/pro/myokx.py +28 -0
- ccxt/pro/ndax.py +25 -12
- ccxt/pro/okcoin.py +28 -9
- ccxt/pro/okx.py +935 -124
- ccxt/pro/onetrading.py +41 -24
- ccxt/pro/oxfun.py +1054 -0
- ccxt/pro/p2b.py +100 -24
- ccxt/pro/paradex.py +352 -0
- ccxt/pro/phemex.py +92 -33
- ccxt/pro/poloniex.py +128 -49
- ccxt/pro/poloniexfutures.py +53 -32
- ccxt/pro/probit.py +92 -85
- ccxt/pro/upbit.py +401 -8
- ccxt/pro/vertex.py +943 -0
- ccxt/pro/wazirx.py +46 -28
- ccxt/pro/whitebit.py +65 -12
- ccxt/pro/woo.py +437 -65
- ccxt/pro/woofipro.py +1271 -0
- ccxt/pro/xt.py +1067 -0
- ccxt/probit.py +143 -110
- ccxt/static_dependencies/__init__.py +1 -1
- ccxt/static_dependencies/lark/__init__.py +38 -0
- ccxt/static_dependencies/lark/__pyinstaller/__init__.py +6 -0
- ccxt/static_dependencies/lark/__pyinstaller/hook-lark.py +14 -0
- ccxt/static_dependencies/lark/ast_utils.py +59 -0
- ccxt/static_dependencies/lark/common.py +86 -0
- ccxt/static_dependencies/lark/exceptions.py +292 -0
- ccxt/static_dependencies/lark/grammar.py +130 -0
- ccxt/static_dependencies/lark/grammars/__init__.py +0 -0
- ccxt/static_dependencies/lark/indenter.py +143 -0
- ccxt/static_dependencies/lark/lark.py +658 -0
- ccxt/static_dependencies/lark/lexer.py +678 -0
- ccxt/static_dependencies/lark/load_grammar.py +1428 -0
- ccxt/static_dependencies/lark/parse_tree_builder.py +391 -0
- ccxt/static_dependencies/lark/parser_frontends.py +257 -0
- ccxt/static_dependencies/lark/parsers/__init__.py +0 -0
- ccxt/static_dependencies/lark/parsers/cyk.py +340 -0
- ccxt/static_dependencies/lark/parsers/earley.py +314 -0
- ccxt/static_dependencies/lark/parsers/earley_common.py +42 -0
- ccxt/static_dependencies/lark/parsers/earley_forest.py +801 -0
- ccxt/static_dependencies/lark/parsers/grammar_analysis.py +203 -0
- ccxt/static_dependencies/lark/parsers/lalr_analysis.py +332 -0
- ccxt/static_dependencies/lark/parsers/lalr_interactive_parser.py +158 -0
- ccxt/static_dependencies/lark/parsers/lalr_parser.py +122 -0
- ccxt/static_dependencies/lark/parsers/lalr_parser_state.py +110 -0
- ccxt/static_dependencies/lark/parsers/xearley.py +165 -0
- ccxt/static_dependencies/lark/py.typed +0 -0
- ccxt/static_dependencies/lark/reconstruct.py +107 -0
- ccxt/static_dependencies/lark/tools/__init__.py +70 -0
- ccxt/static_dependencies/lark/tools/nearley.py +202 -0
- ccxt/static_dependencies/lark/tools/serialize.py +32 -0
- ccxt/static_dependencies/lark/tools/standalone.py +196 -0
- ccxt/static_dependencies/lark/tree.py +267 -0
- ccxt/static_dependencies/lark/tree_matcher.py +186 -0
- ccxt/static_dependencies/lark/tree_templates.py +180 -0
- ccxt/static_dependencies/lark/utils.py +343 -0
- ccxt/static_dependencies/lark/visitors.py +596 -0
- ccxt/static_dependencies/marshmallow/__init__.py +81 -0
- ccxt/static_dependencies/marshmallow/base.py +65 -0
- ccxt/static_dependencies/marshmallow/class_registry.py +94 -0
- ccxt/static_dependencies/marshmallow/decorators.py +231 -0
- ccxt/static_dependencies/marshmallow/error_store.py +60 -0
- ccxt/static_dependencies/marshmallow/exceptions.py +71 -0
- ccxt/static_dependencies/marshmallow/fields.py +2114 -0
- ccxt/static_dependencies/marshmallow/orderedset.py +89 -0
- ccxt/static_dependencies/marshmallow/py.typed +0 -0
- ccxt/static_dependencies/marshmallow/schema.py +1228 -0
- ccxt/static_dependencies/marshmallow/types.py +12 -0
- ccxt/static_dependencies/marshmallow/utils.py +378 -0
- ccxt/static_dependencies/marshmallow/validate.py +678 -0
- ccxt/static_dependencies/marshmallow/warnings.py +2 -0
- ccxt/static_dependencies/marshmallow_dataclass/__init__.py +1047 -0
- ccxt/static_dependencies/marshmallow_dataclass/collection_field.py +51 -0
- ccxt/static_dependencies/marshmallow_dataclass/lazy_class_attribute.py +45 -0
- ccxt/static_dependencies/marshmallow_dataclass/mypy.py +71 -0
- ccxt/static_dependencies/marshmallow_dataclass/py.typed +0 -0
- ccxt/static_dependencies/marshmallow_dataclass/typing.py +14 -0
- ccxt/static_dependencies/marshmallow_dataclass/union_field.py +82 -0
- ccxt/static_dependencies/marshmallow_oneofschema/__init__.py +1 -0
- ccxt/static_dependencies/marshmallow_oneofschema/one_of_schema.py +193 -0
- ccxt/static_dependencies/marshmallow_oneofschema/py.typed +0 -0
- ccxt/static_dependencies/starknet/__init__.py +0 -0
- ccxt/static_dependencies/starknet/cairo/__init__.py +0 -0
- ccxt/static_dependencies/starknet/cairo/data_types.py +123 -0
- ccxt/static_dependencies/starknet/cairo/deprecated_parse/__init__.py +0 -0
- ccxt/static_dependencies/starknet/cairo/deprecated_parse/cairo_types.py +77 -0
- ccxt/static_dependencies/starknet/cairo/deprecated_parse/parser.py +46 -0
- ccxt/static_dependencies/starknet/cairo/deprecated_parse/parser_transformer.py +138 -0
- ccxt/static_dependencies/starknet/cairo/felt.py +64 -0
- ccxt/static_dependencies/starknet/cairo/type_parser.py +121 -0
- ccxt/static_dependencies/starknet/cairo/v1/__init__.py +0 -0
- ccxt/static_dependencies/starknet/cairo/v1/type_parser.py +59 -0
- ccxt/static_dependencies/starknet/cairo/v2/__init__.py +0 -0
- ccxt/static_dependencies/starknet/cairo/v2/type_parser.py +77 -0
- ccxt/static_dependencies/starknet/ccxt_utils.py +7 -0
- ccxt/static_dependencies/starknet/common.py +15 -0
- ccxt/static_dependencies/starknet/constants.py +39 -0
- ccxt/static_dependencies/starknet/hash/__init__.py +0 -0
- ccxt/static_dependencies/starknet/hash/address.py +79 -0
- ccxt/static_dependencies/starknet/hash/compiled_class_hash_objects.py +111 -0
- ccxt/static_dependencies/starknet/hash/selector.py +16 -0
- ccxt/static_dependencies/starknet/hash/storage.py +12 -0
- ccxt/static_dependencies/starknet/hash/utils.py +78 -0
- ccxt/static_dependencies/starknet/models/__init__.py +0 -0
- ccxt/static_dependencies/starknet/models/typed_data.py +45 -0
- ccxt/static_dependencies/starknet/serialization/__init__.py +24 -0
- ccxt/static_dependencies/starknet/serialization/_calldata_reader.py +40 -0
- ccxt/static_dependencies/starknet/serialization/_context.py +142 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/__init__.py +10 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/_common.py +82 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/array_serializer.py +43 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/bool_serializer.py +37 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/byte_array_serializer.py +66 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/cairo_data_serializer.py +71 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/enum_serializer.py +71 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/felt_serializer.py +50 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/named_tuple_serializer.py +58 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/option_serializer.py +43 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/output_serializer.py +40 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/payload_serializer.py +72 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/struct_serializer.py +36 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/tuple_serializer.py +36 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/uint256_serializer.py +76 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/uint_serializer.py +100 -0
- ccxt/static_dependencies/starknet/serialization/data_serializers/unit_serializer.py +32 -0
- ccxt/static_dependencies/starknet/serialization/errors.py +10 -0
- ccxt/static_dependencies/starknet/serialization/factory.py +229 -0
- ccxt/static_dependencies/starknet/serialization/function_serialization_adapter.py +110 -0
- ccxt/static_dependencies/starknet/serialization/tuple_dataclass.py +59 -0
- ccxt/static_dependencies/starknet/utils/__init__.py +0 -0
- ccxt/static_dependencies/starknet/utils/constructor_args_translator.py +86 -0
- ccxt/static_dependencies/starknet/utils/iterable.py +13 -0
- ccxt/static_dependencies/starknet/utils/schema.py +13 -0
- ccxt/static_dependencies/starknet/utils/typed_data.py +182 -0
- ccxt/static_dependencies/starkware/__init__.py +0 -0
- ccxt/static_dependencies/starkware/crypto/__init__.py +0 -0
- ccxt/static_dependencies/starkware/crypto/fast_pedersen_hash.py +50 -0
- ccxt/static_dependencies/starkware/crypto/math_utils.py +78 -0
- ccxt/static_dependencies/starkware/crypto/signature.py +2344 -0
- ccxt/static_dependencies/starkware/crypto/utils.py +63 -0
- ccxt/static_dependencies/sympy/__init__.py +0 -0
- ccxt/static_dependencies/sympy/core/__init__.py +0 -0
- ccxt/static_dependencies/sympy/core/intfunc.py +35 -0
- ccxt/static_dependencies/sympy/external/__init__.py +0 -0
- ccxt/static_dependencies/sympy/external/gmpy.py +345 -0
- ccxt/static_dependencies/sympy/external/importtools.py +187 -0
- ccxt/static_dependencies/sympy/external/ntheory.py +637 -0
- ccxt/static_dependencies/sympy/external/pythonmpq.py +341 -0
- ccxt/static_dependencies/typing_inspect/__init__.py +0 -0
- ccxt/static_dependencies/typing_inspect/typing_inspect.py +851 -0
- ccxt/test/{test_async.py → tests_async.py} +456 -391
- ccxt/test/tests_helpers.py +285 -0
- ccxt/test/tests_init.py +39 -0
- ccxt/test/{test_sync.py → tests_sync.py} +456 -393
- ccxt/timex.py +123 -70
- ccxt/tokocrypto.py +129 -93
- ccxt/tradeogre.py +39 -25
- ccxt/upbit.py +322 -113
- ccxt/vertex.py +2983 -0
- ccxt/wavesexchange.py +227 -173
- ccxt/wazirx.py +145 -65
- ccxt/whitebit.py +533 -138
- ccxt/woo.py +1137 -296
- ccxt/woofipro.py +2716 -0
- ccxt/xt.py +4627 -0
- ccxt/yobit.py +159 -92
- ccxt/zaif.py +80 -33
- ccxt/zonda.py +140 -69
- ccxt-4.4.49.dist-info/LICENSE.txt +21 -0
- ccxt-4.4.49.dist-info/METADATA +646 -0
- ccxt-4.4.49.dist-info/RECORD +669 -0
- {ccxt-4.2.77.dist-info → ccxt-4.4.49.dist-info}/WHEEL +1 -1
- ccxt/abstract/bitbay.py +0 -47
- ccxt/abstract/bitfinex2.py +0 -139
- ccxt/abstract/hitbtc3.py +0 -115
- ccxt/async_support/bitbay.py +0 -17
- ccxt/async_support/bitfinex2.py +0 -3496
- ccxt/async_support/flowbtc.py +0 -34
- ccxt/bitbay.py +0 -17
- ccxt/bitfinex2.py +0 -3496
- ccxt/flowbtc.py +0 -34
- ccxt/hitbtc3.py +0 -16
- ccxt/pro/bitfinex2.py +0 -1081
- ccxt/test/base/__init__.py +0 -28
- ccxt/test/base/test_account.py +0 -26
- ccxt/test/base/test_balance.py +0 -56
- ccxt/test/base/test_borrow_interest.py +0 -35
- ccxt/test/base/test_borrow_rate.py +0 -32
- ccxt/test/base/test_calculate_fee.py +0 -51
- ccxt/test/base/test_crypto.py +0 -127
- ccxt/test/base/test_currency.py +0 -76
- ccxt/test/base/test_datetime.py +0 -103
- ccxt/test/base/test_decimal_to_precision.py +0 -392
- ccxt/test/base/test_deep_extend.py +0 -68
- ccxt/test/base/test_deposit_withdrawal.py +0 -50
- ccxt/test/base/test_exchange_datetime_functions.py +0 -76
- ccxt/test/base/test_funding_rate_history.py +0 -29
- ccxt/test/base/test_last_price.py +0 -32
- ccxt/test/base/test_ledger_entry.py +0 -45
- ccxt/test/base/test_ledger_item.py +0 -48
- ccxt/test/base/test_leverage_tier.py +0 -33
- ccxt/test/base/test_margin_mode.py +0 -24
- ccxt/test/base/test_margin_modification.py +0 -35
- ccxt/test/base/test_market.py +0 -190
- ccxt/test/base/test_number.py +0 -411
- ccxt/test/base/test_ohlcv.py +0 -32
- ccxt/test/base/test_open_interest.py +0 -32
- ccxt/test/base/test_order.py +0 -64
- ccxt/test/base/test_order_book.py +0 -63
- ccxt/test/base/test_position.py +0 -60
- ccxt/test/base/test_shared_methods.py +0 -345
- ccxt/test/base/test_status.py +0 -24
- ccxt/test/base/test_throttle.py +0 -126
- ccxt/test/base/test_ticker.py +0 -86
- ccxt/test/base/test_trade.py +0 -47
- ccxt/test/base/test_trading_fee.py +0 -26
- ccxt/test/base/test_transaction.py +0 -39
- ccxt-4.2.77.dist-info/METADATA +0 -626
- ccxt-4.2.77.dist-info/RECORD +0 -534
- {ccxt-4.2.77.dist-info → ccxt-4.4.49.dist-info}/top_level.txt +0 -0
ccxt/async_support/idex.py
CHANGED
@@ -6,9 +6,10 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.idex import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Balances, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
|
9
|
+
from ccxt.base.types import Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
|
+
from ccxt.base.errors import AuthenticationError
|
12
13
|
from ccxt.base.errors import BadRequest
|
13
14
|
from ccxt.base.errors import InsufficientFunds
|
14
15
|
from ccxt.base.errors import InvalidAddress
|
@@ -16,10 +17,8 @@ from ccxt.base.errors import InvalidOrder
|
|
16
17
|
from ccxt.base.errors import NotSupported
|
17
18
|
from ccxt.base.errors import DDoSProtection
|
18
19
|
from ccxt.base.errors import ExchangeNotAvailable
|
19
|
-
from ccxt.base.errors import AuthenticationError
|
20
20
|
from ccxt.base.decimal_to_precision import ROUND
|
21
21
|
from ccxt.base.decimal_to_precision import TRUNCATE
|
22
|
-
from ccxt.base.decimal_to_precision import DECIMAL_PLACES
|
23
22
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
24
23
|
from ccxt.base.decimal_to_precision import PAD_WITH_ZERO
|
25
24
|
from ccxt.base.precise import Precise
|
@@ -35,6 +34,7 @@ class idex(Exchange, ImplicitAPI):
|
|
35
34
|
'rateLimit': 1000,
|
36
35
|
'version': 'v3',
|
37
36
|
'pro': True,
|
37
|
+
'dex': True,
|
38
38
|
'certified': False,
|
39
39
|
'requiresWeb3': True,
|
40
40
|
'has': {
|
@@ -88,8 +88,11 @@ class idex(Exchange, ImplicitAPI):
|
|
88
88
|
'fetchOrderBook': True,
|
89
89
|
'fetchOrders': False,
|
90
90
|
'fetchPosition': False,
|
91
|
+
'fetchPositionHistory': False,
|
91
92
|
'fetchPositionMode': False,
|
92
93
|
'fetchPositions': False,
|
94
|
+
'fetchPositionsForSymbol': False,
|
95
|
+
'fetchPositionsHistory': False,
|
93
96
|
'fetchPositionsRisk': False,
|
94
97
|
'fetchPremiumIndexOHLCV': False,
|
95
98
|
'fetchStatus': True,
|
@@ -103,6 +106,7 @@ class idex(Exchange, ImplicitAPI):
|
|
103
106
|
'fetchWithdrawal': True,
|
104
107
|
'fetchWithdrawals': True,
|
105
108
|
'reduceMargin': False,
|
109
|
+
'sandbox': True,
|
106
110
|
'setLeverage': False,
|
107
111
|
'setMarginMode': False,
|
108
112
|
'setPositionMode': False,
|
@@ -172,14 +176,87 @@ class idex(Exchange, ImplicitAPI):
|
|
172
176
|
'defaultSelfTradePrevention': 'cn',
|
173
177
|
'network': 'MATIC',
|
174
178
|
},
|
179
|
+
'features': {
|
180
|
+
'spot': {
|
181
|
+
'sandbox': False,
|
182
|
+
'createOrder': {
|
183
|
+
'marginMode': False,
|
184
|
+
'triggerPrice': True,
|
185
|
+
# todo: revise
|
186
|
+
'triggerPriceType': {
|
187
|
+
'last': True,
|
188
|
+
'mark': True,
|
189
|
+
'index': True,
|
190
|
+
},
|
191
|
+
'triggerDirection': False,
|
192
|
+
'stopLossPrice': False, # todo
|
193
|
+
'takeProfitPrice': False, # todo
|
194
|
+
'attachedStopLossTakeProfit': None,
|
195
|
+
'timeInForce': {
|
196
|
+
'IOC': True,
|
197
|
+
'FOK': True,
|
198
|
+
'PO': True,
|
199
|
+
'GTD': False,
|
200
|
+
},
|
201
|
+
'hedged': False,
|
202
|
+
'selfTradePrevention': True, # todo implementation
|
203
|
+
'trailing': False,
|
204
|
+
'leverage': False,
|
205
|
+
'marketBuyByCost': False,
|
206
|
+
'marketBuyRequiresPrice': False,
|
207
|
+
'iceberg': False,
|
208
|
+
},
|
209
|
+
'createOrders': None,
|
210
|
+
'fetchMyTrades': {
|
211
|
+
'marginMode': False,
|
212
|
+
'limit': 1000,
|
213
|
+
'daysBack': 100000, # todo
|
214
|
+
'untilDays': 100000, # todo
|
215
|
+
},
|
216
|
+
'fetchOrder': {
|
217
|
+
'marginMode': False,
|
218
|
+
'trigger': False,
|
219
|
+
'trailing': False,
|
220
|
+
},
|
221
|
+
'fetchOpenOrders': {
|
222
|
+
'marginMode': False,
|
223
|
+
'limit': 1000,
|
224
|
+
'trigger': False,
|
225
|
+
'trailing': False,
|
226
|
+
},
|
227
|
+
'fetchOrders': None,
|
228
|
+
'fetchClosedOrders': {
|
229
|
+
'marginMode': False,
|
230
|
+
'limit': 1000,
|
231
|
+
'daysBack': 1000000, # todo
|
232
|
+
'daysBackCanceled': 1, # todo
|
233
|
+
'untilDays': 1000000, # todo
|
234
|
+
'trigger': False,
|
235
|
+
'trailing': False,
|
236
|
+
},
|
237
|
+
'fetchOHLCV': {
|
238
|
+
'limit': 1000,
|
239
|
+
},
|
240
|
+
},
|
241
|
+
'swap': {
|
242
|
+
'linear': None,
|
243
|
+
'inverse': None,
|
244
|
+
},
|
245
|
+
'future': {
|
246
|
+
'linear': None,
|
247
|
+
'inverse': None,
|
248
|
+
},
|
249
|
+
},
|
175
250
|
'exceptions': {
|
176
|
-
'
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
251
|
+
'exact': {
|
252
|
+
'INVALID_ORDER_QUANTITY': InvalidOrder,
|
253
|
+
'INSUFFICIENT_FUNDS': InsufficientFunds,
|
254
|
+
'SERVICE_UNAVAILABLE': ExchangeNotAvailable,
|
255
|
+
'EXCEEDED_RATE_LIMIT': DDoSProtection,
|
256
|
+
'INVALID_PARAMETER': BadRequest,
|
257
|
+
'WALLET_NOT_ASSOCIATED': InvalidAddress,
|
258
|
+
'INVALID_WALLET_SIGNATURE': AuthenticationError,
|
259
|
+
},
|
183
260
|
},
|
184
261
|
'requiredCredentials': {
|
185
262
|
'walletAddress': True,
|
@@ -199,15 +276,15 @@ class idex(Exchange, ImplicitAPI):
|
|
199
276
|
# {"code":"INVALID_PARAMETER","message":"invalid value provided for request parameter \"price\": all quantities and prices must be below 100 billion, above 0, need to be provided, and always require 4 decimals ending with 4 zeroes"}
|
200
277
|
#
|
201
278
|
market = self.market(symbol)
|
202
|
-
info = self.safe_value(market, 'info', {})
|
203
|
-
quoteAssetPrecision = self.safe_integer(info, 'quoteAssetPrecision')
|
204
279
|
price = self.decimal_to_precision(price, ROUND, market['precision']['price'], self.precisionMode)
|
205
|
-
return self.decimal_to_precision(price, TRUNCATE,
|
280
|
+
return self.decimal_to_precision(price, TRUNCATE, market['precision']['quote'], TICK_SIZE, PAD_WITH_ZERO)
|
206
281
|
|
207
|
-
async def fetch_markets(self, params={}):
|
282
|
+
async def fetch_markets(self, params={}) -> List[Market]:
|
208
283
|
"""
|
209
284
|
retrieves data on all markets for idex
|
210
|
-
|
285
|
+
|
286
|
+
https://api-docs-v3.idex.io/#get-markets
|
287
|
+
|
211
288
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
212
289
|
:returns dict[]: an array of objects representing market data
|
213
290
|
"""
|
@@ -307,6 +384,8 @@ class idex(Exchange, ImplicitAPI):
|
|
307
384
|
'precision': {
|
308
385
|
'amount': basePrecision,
|
309
386
|
'price': self.safe_number(entry, 'tickSize'),
|
387
|
+
'base': basePrecision,
|
388
|
+
'quote': quotePrecision,
|
310
389
|
},
|
311
390
|
'limits': {
|
312
391
|
'leverage': {
|
@@ -334,14 +413,16 @@ class idex(Exchange, ImplicitAPI):
|
|
334
413
|
async def fetch_ticker(self, symbol: str, params={}) -> Ticker:
|
335
414
|
"""
|
336
415
|
fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
337
|
-
|
416
|
+
|
417
|
+
https://api-docs-v3.idex.io/#get-tickers
|
418
|
+
|
338
419
|
:param str symbol: unified symbol of the market to fetch the ticker for
|
339
420
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
340
421
|
:returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
|
341
422
|
"""
|
342
423
|
await self.load_markets()
|
343
424
|
market = self.market(symbol)
|
344
|
-
request = {
|
425
|
+
request: dict = {
|
345
426
|
'market': market['id'],
|
346
427
|
}
|
347
428
|
# [
|
@@ -363,13 +444,15 @@ class idex(Exchange, ImplicitAPI):
|
|
363
444
|
# }
|
364
445
|
# ]
|
365
446
|
response = await self.publicGetTickers(self.extend(request, params))
|
366
|
-
ticker = self.
|
447
|
+
ticker = self.safe_dict(response, 0)
|
367
448
|
return self.parse_ticker(ticker, market)
|
368
449
|
|
369
450
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
370
451
|
"""
|
371
452
|
fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
|
372
|
-
|
453
|
+
|
454
|
+
https://api-docs-v3.idex.io/#get-tickers
|
455
|
+
|
373
456
|
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
|
374
457
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
375
458
|
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
|
@@ -396,7 +479,7 @@ class idex(Exchange, ImplicitAPI):
|
|
396
479
|
response = await self.publicGetTickers(params)
|
397
480
|
return self.parse_tickers(response, symbols)
|
398
481
|
|
399
|
-
def parse_ticker(self, ticker, market: Market = None) -> Ticker:
|
482
|
+
def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
|
400
483
|
# {
|
401
484
|
# "market": "DIL-ETH",
|
402
485
|
# "time": 1598367493008,
|
@@ -444,7 +527,9 @@ class idex(Exchange, ImplicitAPI):
|
|
444
527
|
async def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
|
445
528
|
"""
|
446
529
|
fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
447
|
-
|
530
|
+
|
531
|
+
https://api-docs-v3.idex.io/#get-candles
|
532
|
+
|
448
533
|
:param str symbol: unified symbol of the market to fetch OHLCV data for
|
449
534
|
:param str timeframe: the length of time each candle represents
|
450
535
|
:param int [since]: timestamp in ms of the earliest candle to fetch
|
@@ -454,14 +539,14 @@ class idex(Exchange, ImplicitAPI):
|
|
454
539
|
"""
|
455
540
|
await self.load_markets()
|
456
541
|
market = self.market(symbol)
|
457
|
-
request = {
|
542
|
+
request: dict = {
|
458
543
|
'market': market['id'],
|
459
544
|
'interval': timeframe,
|
460
545
|
}
|
461
546
|
if since is not None:
|
462
547
|
request['start'] = since
|
463
548
|
if limit is not None:
|
464
|
-
request['limit'] = limit
|
549
|
+
request['limit'] = min(limit, 1000)
|
465
550
|
response = await self.publicGetCandles(self.extend(request, params))
|
466
551
|
if isinstance(response, list):
|
467
552
|
# [
|
@@ -501,7 +586,9 @@ class idex(Exchange, ImplicitAPI):
|
|
501
586
|
async def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
|
502
587
|
"""
|
503
588
|
get the list of most recent trades for a particular symbol
|
504
|
-
|
589
|
+
|
590
|
+
https://api-docs-v3.idex.io/#get-trades
|
591
|
+
|
505
592
|
:param str symbol: unified symbol of the market to fetch trades for
|
506
593
|
:param int [since]: timestamp in ms of the earliest trade to fetch
|
507
594
|
:param int [limit]: the maximum amount of trades to fetch
|
@@ -510,7 +597,7 @@ class idex(Exchange, ImplicitAPI):
|
|
510
597
|
"""
|
511
598
|
await self.load_markets()
|
512
599
|
market = self.market(symbol)
|
513
|
-
request = {
|
600
|
+
request: dict = {
|
514
601
|
'market': market['id'],
|
515
602
|
}
|
516
603
|
if since is not None:
|
@@ -531,7 +618,7 @@ class idex(Exchange, ImplicitAPI):
|
|
531
618
|
response = await self.publicGetTrades(self.extend(request, params))
|
532
619
|
return self.parse_trades(response, market, since, limit)
|
533
620
|
|
534
|
-
def parse_trade(self, trade, market: Market = None) -> Trade:
|
621
|
+
def parse_trade(self, trade: dict, market: Market = None) -> Trade:
|
535
622
|
#
|
536
623
|
# public trades
|
537
624
|
# {
|
@@ -607,17 +694,19 @@ class idex(Exchange, ImplicitAPI):
|
|
607
694
|
'fee': fee,
|
608
695
|
}, market)
|
609
696
|
|
610
|
-
async def fetch_trading_fees(self, params={}):
|
697
|
+
async def fetch_trading_fees(self, params={}) -> TradingFees:
|
611
698
|
"""
|
612
699
|
fetch the trading fees for multiple markets
|
613
|
-
|
700
|
+
|
701
|
+
https://api-docs-v3.idex.io/#get-api-account
|
702
|
+
|
614
703
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
615
704
|
:returns dict: a dictionary of `fee structures <https://docs.ccxt.com/#/?id=fee-structure>` indexed by market symbols
|
616
705
|
"""
|
617
706
|
self.check_required_credentials()
|
618
707
|
await self.load_markets()
|
619
708
|
nonce = self.uuidv1()
|
620
|
-
request = {
|
709
|
+
request: dict = {
|
621
710
|
'nonce': nonce,
|
622
711
|
}
|
623
712
|
response = None
|
@@ -637,7 +726,7 @@ class idex(Exchange, ImplicitAPI):
|
|
637
726
|
#
|
638
727
|
maker = self.safe_number(response, 'makerFeeRate')
|
639
728
|
taker = self.safe_number(response, 'takerFeeRate')
|
640
|
-
result = {}
|
729
|
+
result: dict = {}
|
641
730
|
for i in range(0, len(self.symbols)):
|
642
731
|
symbol = self.symbols[i]
|
643
732
|
result[symbol] = {
|
@@ -653,7 +742,9 @@ class idex(Exchange, ImplicitAPI):
|
|
653
742
|
async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
654
743
|
"""
|
655
744
|
fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
|
656
|
-
|
745
|
+
|
746
|
+
https://api-docs-v3.idex.io/#get-order-books
|
747
|
+
|
657
748
|
:param str symbol: unified symbol of the market to fetch the order book for
|
658
749
|
:param int [limit]: the maximum amount of order book entries to return
|
659
750
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -661,7 +752,7 @@ class idex(Exchange, ImplicitAPI):
|
|
661
752
|
"""
|
662
753
|
await self.load_markets()
|
663
754
|
market = self.market(symbol)
|
664
|
-
request = {
|
755
|
+
request: dict = {
|
665
756
|
'market': market['id'],
|
666
757
|
'level': 2,
|
667
758
|
}
|
@@ -710,10 +801,12 @@ class idex(Exchange, ImplicitAPI):
|
|
710
801
|
descending = side == 'bids'
|
711
802
|
return self.sort_by(result, 0, descending)
|
712
803
|
|
713
|
-
async def fetch_currencies(self, params={}):
|
804
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
714
805
|
"""
|
715
806
|
fetches all available currencies on an exchange
|
716
|
-
|
807
|
+
|
808
|
+
https://api-docs-v3.idex.io/#get-assets
|
809
|
+
|
717
810
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
718
811
|
:returns dict: an associative dictionary of currencies
|
719
812
|
"""
|
@@ -730,7 +823,7 @@ class idex(Exchange, ImplicitAPI):
|
|
730
823
|
# },
|
731
824
|
# ]
|
732
825
|
#
|
733
|
-
result = {}
|
826
|
+
result: dict = {}
|
734
827
|
for i in range(0, len(response)):
|
735
828
|
entry = response[i]
|
736
829
|
name = self.safe_string(entry, 'name')
|
@@ -756,7 +849,7 @@ class idex(Exchange, ImplicitAPI):
|
|
756
849
|
return result
|
757
850
|
|
758
851
|
def parse_balance(self, response) -> Balances:
|
759
|
-
result = {
|
852
|
+
result: dict = {
|
760
853
|
'info': response,
|
761
854
|
'timestamp': None,
|
762
855
|
'datetime': None,
|
@@ -775,14 +868,16 @@ class idex(Exchange, ImplicitAPI):
|
|
775
868
|
async def fetch_balance(self, params={}) -> Balances:
|
776
869
|
"""
|
777
870
|
query for balance and get the amount of funds available for trading or funds locked in orders
|
778
|
-
|
871
|
+
|
872
|
+
https://api-docs-v3.idex.io/#get-balances
|
873
|
+
|
779
874
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
780
875
|
:returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
|
781
876
|
"""
|
782
877
|
self.check_required_credentials()
|
783
878
|
await self.load_markets()
|
784
879
|
nonce1 = self.uuidv1()
|
785
|
-
request = {
|
880
|
+
request: dict = {
|
786
881
|
'nonce': nonce1,
|
787
882
|
'wallet': self.walletAddress,
|
788
883
|
}
|
@@ -813,7 +908,9 @@ class idex(Exchange, ImplicitAPI):
|
|
813
908
|
async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
814
909
|
"""
|
815
910
|
fetch all trades made by the user
|
816
|
-
|
911
|
+
|
912
|
+
https://api-docs-v3.idex.io/#get-fills
|
913
|
+
|
817
914
|
:param str symbol: unified market symbol
|
818
915
|
:param int [since]: the earliest time in ms to fetch trades for
|
819
916
|
:param int [limit]: the maximum number of trades structures to retrieve
|
@@ -823,7 +920,7 @@ class idex(Exchange, ImplicitAPI):
|
|
823
920
|
self.check_required_credentials()
|
824
921
|
await self.load_markets()
|
825
922
|
market = None
|
826
|
-
request = {
|
923
|
+
request: dict = {
|
827
924
|
'nonce': self.uuidv1(),
|
828
925
|
'wallet': self.walletAddress,
|
829
926
|
}
|
@@ -872,12 +969,15 @@ class idex(Exchange, ImplicitAPI):
|
|
872
969
|
async def fetch_order(self, id: str, symbol: Str = None, params={}):
|
873
970
|
"""
|
874
971
|
fetches information on an order made by the user
|
875
|
-
|
972
|
+
|
973
|
+
https://api-docs-v3.idex.io/#get-orders
|
974
|
+
|
975
|
+
:param str id: order id
|
876
976
|
:param str symbol: unified symbol of the market the order was made in
|
877
977
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
878
978
|
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
879
979
|
"""
|
880
|
-
request = {
|
980
|
+
request: dict = {
|
881
981
|
'orderId': id,
|
882
982
|
}
|
883
983
|
return await self.fetch_orders_helper(symbol, None, None, self.extend(request, params))
|
@@ -885,14 +985,16 @@ class idex(Exchange, ImplicitAPI):
|
|
885
985
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
886
986
|
"""
|
887
987
|
fetch all unfilled currently open orders
|
888
|
-
|
988
|
+
|
989
|
+
https://api-docs-v3.idex.io/#get-orders
|
990
|
+
|
889
991
|
:param str symbol: unified market symbol
|
890
992
|
:param int [since]: the earliest time in ms to fetch open orders for
|
891
993
|
:param int [limit]: the maximum number of open orders structures to retrieve
|
892
994
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
893
995
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
894
996
|
"""
|
895
|
-
request = {
|
997
|
+
request: dict = {
|
896
998
|
'closed': False,
|
897
999
|
}
|
898
1000
|
return await self.fetch_orders_helper(symbol, since, limit, self.extend(request, params))
|
@@ -900,21 +1002,23 @@ class idex(Exchange, ImplicitAPI):
|
|
900
1002
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
901
1003
|
"""
|
902
1004
|
fetches information on multiple closed orders made by the user
|
903
|
-
|
1005
|
+
|
1006
|
+
https://api-docs-v3.idex.io/#get-orders
|
1007
|
+
|
904
1008
|
:param str symbol: unified market symbol of the market orders were made in
|
905
1009
|
:param int [since]: the earliest time in ms to fetch orders for
|
906
1010
|
:param int [limit]: the maximum number of order structures to retrieve
|
907
1011
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
908
1012
|
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
909
1013
|
"""
|
910
|
-
request = {
|
1014
|
+
request: dict = {
|
911
1015
|
'closed': True,
|
912
1016
|
}
|
913
1017
|
return await self.fetch_orders_helper(symbol, since, limit, self.extend(request, params))
|
914
1018
|
|
915
1019
|
async def fetch_orders_helper(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
916
1020
|
await self.load_markets()
|
917
|
-
request = {
|
1021
|
+
request: dict = {
|
918
1022
|
'nonce': self.uuidv1(),
|
919
1023
|
'wallet': self.walletAddress,
|
920
1024
|
}
|
@@ -993,9 +1097,9 @@ class idex(Exchange, ImplicitAPI):
|
|
993
1097
|
else:
|
994
1098
|
return self.parse_order(response, market)
|
995
1099
|
|
996
|
-
def parse_order_status(self, status):
|
1100
|
+
def parse_order_status(self, status: Str):
|
997
1101
|
# https://docs.idex.io/#order-states-amp-lifecycle
|
998
|
-
statuses = {
|
1102
|
+
statuses: dict = {
|
999
1103
|
'active': 'open',
|
1000
1104
|
'partiallyFilled': 'open',
|
1001
1105
|
'rejected': 'canceled',
|
@@ -1003,7 +1107,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1003
1107
|
}
|
1004
1108
|
return self.safe_string(statuses, status, status)
|
1005
1109
|
|
1006
|
-
def parse_order(self, order, market: Market = None) -> Order:
|
1110
|
+
def parse_order(self, order: dict, market: Market = None) -> Order:
|
1007
1111
|
#
|
1008
1112
|
# {
|
1009
1113
|
# "market": "DIL-ETH",
|
@@ -1065,7 +1169,6 @@ class idex(Exchange, ImplicitAPI):
|
|
1065
1169
|
'postOnly': None,
|
1066
1170
|
'side': side,
|
1067
1171
|
'price': price,
|
1068
|
-
'stopPrice': None,
|
1069
1172
|
'triggerPrice': None,
|
1070
1173
|
'amount': amount,
|
1071
1174
|
'cost': None,
|
@@ -1092,7 +1195,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1092
1195
|
# "totalPortfolioValueUsd": "0.00",
|
1093
1196
|
# "time": 1598468353626
|
1094
1197
|
# }
|
1095
|
-
request = {
|
1198
|
+
request: dict = {
|
1096
1199
|
'parameters': {
|
1097
1200
|
'nonce': nonce,
|
1098
1201
|
'wallet': walletAddress,
|
@@ -1105,12 +1208,14 @@ class idex(Exchange, ImplicitAPI):
|
|
1105
1208
|
async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
1106
1209
|
"""
|
1107
1210
|
create a trade order, https://docs.idex.io/#create-order
|
1108
|
-
|
1211
|
+
|
1212
|
+
https://api-docs-v3.idex.io/#create-order
|
1213
|
+
|
1109
1214
|
:param str symbol: unified symbol of the market to create an order in
|
1110
1215
|
:param str type: 'market' or 'limit'
|
1111
1216
|
:param str side: 'buy' or 'sell'
|
1112
1217
|
:param float amount: how much of currency you want to trade in units of base currency
|
1113
|
-
:param float [price]: the price at which the order is to be
|
1218
|
+
:param float [price]: the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
|
1114
1219
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1115
1220
|
:param bool [params.test]: set to True to test an order, no order will be created but the request will be validated
|
1116
1221
|
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1122,18 +1227,19 @@ class idex(Exchange, ImplicitAPI):
|
|
1122
1227
|
market = self.market(symbol)
|
1123
1228
|
nonce = self.uuidv1()
|
1124
1229
|
typeEnum = None
|
1125
|
-
stopLossTypeEnums = {
|
1230
|
+
stopLossTypeEnums: dict = {
|
1126
1231
|
'stopLoss': 3,
|
1127
1232
|
'stopLossLimit': 4,
|
1128
1233
|
'takeProfit': 5,
|
1129
1234
|
'takeProfitLimit': 6,
|
1130
1235
|
}
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1236
|
+
triggerPrice = self.safe_string(params, 'triggerPrice', 'stopPrice')
|
1237
|
+
triggerPriceString = None
|
1238
|
+
if (type == 'stopLossLimit') or (type == 'takeProfitLimit'):
|
1239
|
+
if triggerPrice is None:
|
1240
|
+
raise BadRequest(self.id + ' createOrder() triggerPrice is a required parameter for ' + type + 'orders')
|
1241
|
+
triggerPriceString = self.price_to_precision(symbol, triggerPrice)
|
1242
|
+
limitTypeEnums: dict = {
|
1137
1243
|
'limit': 1,
|
1138
1244
|
'limitMaker': 2,
|
1139
1245
|
}
|
@@ -1166,7 +1272,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1166
1272
|
})
|
1167
1273
|
amountString = self.amount_to_precision(symbol, amount)
|
1168
1274
|
# https://docs.idex.io/#time-in-force
|
1169
|
-
timeInForceEnums = {
|
1275
|
+
timeInForceEnums: dict = {
|
1170
1276
|
'gtc': 0,
|
1171
1277
|
'ioc': 2,
|
1172
1278
|
'fok': 3,
|
@@ -1181,7 +1287,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1181
1287
|
asString = ', '.join(allOptions)
|
1182
1288
|
raise BadRequest(self.id + ' ' + timeInForce + ' is not a valid timeInForce, please choose one of ' + asString)
|
1183
1289
|
# https://docs.idex.io/#self-trade-prevention
|
1184
|
-
selfTradePreventionEnums = {
|
1290
|
+
selfTradePreventionEnums: dict = {
|
1185
1291
|
'dc': 0,
|
1186
1292
|
'co': 1,
|
1187
1293
|
'cn': 2,
|
@@ -1210,7 +1316,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1210
1316
|
encodedPrice = self.encode(priceString)
|
1211
1317
|
byteArray.append(encodedPrice)
|
1212
1318
|
if type in stopLossTypeEnums:
|
1213
|
-
encodedPrice = self.encode(
|
1319
|
+
encodedPrice = self.encode(triggerPriceString or priceString)
|
1214
1320
|
byteArray.append(encodedPrice)
|
1215
1321
|
clientOrderId = self.safe_string(params, 'clientOrderId')
|
1216
1322
|
if clientOrderId is not None:
|
@@ -1224,7 +1330,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1224
1330
|
binary = self.binary_concat_array(allBytes)
|
1225
1331
|
hash = self.hash(binary, 'keccak', 'hex')
|
1226
1332
|
signature = self.sign_message_string(hash, self.privateKey)
|
1227
|
-
request = {
|
1333
|
+
request: dict = {
|
1228
1334
|
'parameters': {
|
1229
1335
|
'nonce': nonce,
|
1230
1336
|
'market': market['id'],
|
@@ -1240,7 +1346,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1240
1346
|
if limitOrder:
|
1241
1347
|
request['parameters']['price'] = priceString
|
1242
1348
|
if type in stopLossTypeEnums:
|
1243
|
-
request['parameters']['stopPrice'] =
|
1349
|
+
request['parameters']['stopPrice'] = triggerPriceString or priceString
|
1244
1350
|
if amountEnum == 0:
|
1245
1351
|
request['parameters']['quantity'] = amountString
|
1246
1352
|
else:
|
@@ -1285,10 +1391,12 @@ class idex(Exchange, ImplicitAPI):
|
|
1285
1391
|
response = await self.privatePostOrders(request)
|
1286
1392
|
return self.parse_order(response, market)
|
1287
1393
|
|
1288
|
-
async def withdraw(self, code: str, amount: float, address, tag=None, params={}):
|
1394
|
+
async def withdraw(self, code: str, amount: float, address: str, tag=None, params={}) -> Transaction:
|
1289
1395
|
"""
|
1290
1396
|
make a withdrawal
|
1291
|
-
|
1397
|
+
|
1398
|
+
https://api-docs-v3.idex.io/#withdraw-funds
|
1399
|
+
|
1292
1400
|
:param str code: unified currency code
|
1293
1401
|
:param float amount: the amount to withdraw
|
1294
1402
|
:param str address: the address to withdraw to
|
@@ -1313,7 +1421,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1313
1421
|
binary = self.binary_concat_array(byteArray)
|
1314
1422
|
hash = self.hash(binary, 'keccak', 'hex')
|
1315
1423
|
signature = self.sign_message_string(hash, self.privateKey)
|
1316
|
-
request = {
|
1424
|
+
request: dict = {
|
1317
1425
|
'parameters': {
|
1318
1426
|
'nonce': nonce,
|
1319
1427
|
'wallet': address,
|
@@ -1340,7 +1448,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1340
1448
|
async def cancel_all_orders(self, symbol: Str = None, params={}):
|
1341
1449
|
"""
|
1342
1450
|
cancel all open orders
|
1343
|
-
|
1451
|
+
|
1452
|
+
https://api-docs-v3.idex.io/#cancel-order
|
1453
|
+
|
1344
1454
|
:param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
|
1345
1455
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1346
1456
|
:returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
@@ -1351,7 +1461,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1351
1461
|
if symbol is not None:
|
1352
1462
|
market = self.market(symbol)
|
1353
1463
|
nonce = self.uuidv1()
|
1354
|
-
request = {
|
1464
|
+
request: dict = {
|
1355
1465
|
'parameters': {
|
1356
1466
|
'nonce': nonce,
|
1357
1467
|
'wallet': self.walletAddress,
|
@@ -1376,7 +1486,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1376
1486
|
async def cancel_order(self, id: str, symbol: Str = None, params={}):
|
1377
1487
|
"""
|
1378
1488
|
cancels an open order
|
1379
|
-
|
1489
|
+
|
1490
|
+
https://api-docs-v3.idex.io/#cancel-order
|
1491
|
+
|
1380
1492
|
:param str id: order id
|
1381
1493
|
:param str symbol: unified symbol of the market the order was made in
|
1382
1494
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1397,7 +1509,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1397
1509
|
binary = self.binary_concat_array(byteArray)
|
1398
1510
|
hash = self.hash(binary, 'keccak', 'hex')
|
1399
1511
|
signature = self.sign_message_string(hash, self.privateKey)
|
1400
|
-
request = {
|
1512
|
+
request: dict = {
|
1401
1513
|
'parameters': {
|
1402
1514
|
'nonce': nonce,
|
1403
1515
|
'wallet': self.walletAddress,
|
@@ -1407,23 +1519,23 @@ class idex(Exchange, ImplicitAPI):
|
|
1407
1519
|
}
|
1408
1520
|
# [{orderId: "688336f0-ec50-11ea-9842-b332f8a34d0e"}]
|
1409
1521
|
response = await self.privateDeleteOrders(self.extend(request, params))
|
1410
|
-
canceledOrder = self.
|
1522
|
+
canceledOrder = self.safe_dict(response, 0)
|
1411
1523
|
return self.parse_order(canceledOrder, market)
|
1412
1524
|
|
1413
|
-
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
|
1525
|
+
def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
|
1414
1526
|
errorCode = self.safe_string(response, 'code')
|
1415
1527
|
message = self.safe_string(response, 'message')
|
1416
|
-
if errorCode in self.exceptions:
|
1417
|
-
Exception = self.exceptions[errorCode]
|
1418
|
-
raise Exception(self.id + ' ' + message)
|
1419
1528
|
if errorCode is not None:
|
1529
|
+
self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, message)
|
1420
1530
|
raise ExchangeError(self.id + ' ' + message)
|
1421
1531
|
return None
|
1422
1532
|
|
1423
1533
|
async def fetch_deposit(self, id: str, code: Str = None, params={}):
|
1424
1534
|
"""
|
1425
1535
|
fetch information on a deposit
|
1426
|
-
|
1536
|
+
|
1537
|
+
https://api-docs-v3.idex.io/#get-deposits
|
1538
|
+
|
1427
1539
|
:param str id: deposit id
|
1428
1540
|
:param str code: not used by idex fetchDeposit()
|
1429
1541
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1431,7 +1543,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1431
1543
|
"""
|
1432
1544
|
await self.load_markets()
|
1433
1545
|
nonce = self.uuidv1()
|
1434
|
-
request = {
|
1546
|
+
request: dict = {
|
1435
1547
|
'nonce': nonce,
|
1436
1548
|
'wallet': self.walletAddress,
|
1437
1549
|
'depositId': id,
|
@@ -1442,7 +1554,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1442
1554
|
async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1443
1555
|
"""
|
1444
1556
|
fetch all deposits made to an account
|
1445
|
-
|
1557
|
+
|
1558
|
+
https://api-docs-v3.idex.io/#get-deposits
|
1559
|
+
|
1446
1560
|
:param str code: unified currency code
|
1447
1561
|
:param int [since]: the earliest time in ms to fetch deposits for
|
1448
1562
|
:param int [limit]: the maximum number of deposits structures to retrieve
|
@@ -1457,7 +1571,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1457
1571
|
async def fetch_status(self, params={}):
|
1458
1572
|
"""
|
1459
1573
|
the latest known information on the availability of the exchange API
|
1460
|
-
|
1574
|
+
|
1575
|
+
https://api-docs-v3.idex.io/#get-ping
|
1576
|
+
|
1461
1577
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1462
1578
|
:returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
|
1463
1579
|
"""
|
@@ -1473,7 +1589,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1473
1589
|
async def fetch_time(self, params={}):
|
1474
1590
|
"""
|
1475
1591
|
fetches the current integer timestamp in milliseconds from the exchange server
|
1476
|
-
|
1592
|
+
|
1593
|
+
https://api-docs-v3.idex.io/#get-time
|
1594
|
+
|
1477
1595
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1478
1596
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
1479
1597
|
"""
|
@@ -1486,7 +1604,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1486
1604
|
async def fetch_withdrawal(self, id: str, code: Str = None, params={}):
|
1487
1605
|
"""
|
1488
1606
|
fetch data on a currency withdrawal via the withdrawal id
|
1489
|
-
|
1607
|
+
|
1608
|
+
https://api-docs-v3.idex.io/#get-withdrawals
|
1609
|
+
|
1490
1610
|
:param str id: withdrawal id
|
1491
1611
|
:param str code: not used by idex.fetchWithdrawal
|
1492
1612
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
@@ -1494,7 +1614,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1494
1614
|
"""
|
1495
1615
|
await self.load_markets()
|
1496
1616
|
nonce = self.uuidv1()
|
1497
|
-
request = {
|
1617
|
+
request: dict = {
|
1498
1618
|
'nonce': nonce,
|
1499
1619
|
'wallet': self.walletAddress,
|
1500
1620
|
'withdrawalId': id,
|
@@ -1505,7 +1625,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1505
1625
|
async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
|
1506
1626
|
"""
|
1507
1627
|
fetch all withdrawals made from an account
|
1508
|
-
|
1628
|
+
|
1629
|
+
https://api-docs-v3.idex.io/#get-withdrawals
|
1630
|
+
|
1509
1631
|
:param str code: unified currency code
|
1510
1632
|
:param int [since]: the earliest time in ms to fetch withdrawals for
|
1511
1633
|
:param int [limit]: the maximum number of withdrawals structures to retrieve
|
@@ -1520,7 +1642,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1520
1642
|
async def fetch_transactions_helper(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
|
1521
1643
|
await self.load_markets()
|
1522
1644
|
nonce = self.uuidv1()
|
1523
|
-
request = {
|
1645
|
+
request: dict = {
|
1524
1646
|
'nonce': nonce,
|
1525
1647
|
'wallet': self.walletAddress,
|
1526
1648
|
}
|
@@ -1553,13 +1675,13 @@ class idex(Exchange, ImplicitAPI):
|
|
1553
1675
|
raise NotSupported(self.id + ' fetchTransactionsHelper() not support self method')
|
1554
1676
|
return self.parse_transactions(response, currency, since, limit)
|
1555
1677
|
|
1556
|
-
def parse_transaction_status(self, status):
|
1557
|
-
statuses = {
|
1678
|
+
def parse_transaction_status(self, status: Str):
|
1679
|
+
statuses: dict = {
|
1558
1680
|
'mined': 'ok',
|
1559
1681
|
}
|
1560
1682
|
return self.safe_string(statuses, status, status)
|
1561
1683
|
|
1562
|
-
def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
|
1684
|
+
def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
|
1563
1685
|
#
|
1564
1686
|
# fetchDeposits
|
1565
1687
|
#
|
@@ -1650,15 +1772,17 @@ class idex(Exchange, ImplicitAPI):
|
|
1650
1772
|
authenticated = hasApiKey and hasSecret and hasWalletAddress and hasPrivateKey
|
1651
1773
|
return(defaultCost / 2) if authenticated else defaultCost
|
1652
1774
|
|
1653
|
-
async def fetch_deposit_address(self, code: Str = None, params={}):
|
1775
|
+
async def fetch_deposit_address(self, code: Str = None, params={}) -> DepositAddress:
|
1654
1776
|
"""
|
1655
1777
|
fetch the Polygon address of the wallet
|
1656
|
-
|
1778
|
+
|
1779
|
+
https://api-docs-v3.idex.io/#get-wallets
|
1780
|
+
|
1657
1781
|
:param str code: not used by idex
|
1658
1782
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1659
1783
|
:returns dict: an `address structure <https://docs.ccxt.com/#/?id=address-structure>`
|
1660
1784
|
"""
|
1661
|
-
request = {}
|
1785
|
+
request: dict = {}
|
1662
1786
|
request['nonce'] = self.uuidv1()
|
1663
1787
|
response = await self.privateGetWallets(self.extend(request, params))
|
1664
1788
|
#
|
@@ -1677,7 +1801,7 @@ class idex(Exchange, ImplicitAPI):
|
|
1677
1801
|
#
|
1678
1802
|
return self.parse_deposit_address(response)
|
1679
1803
|
|
1680
|
-
def parse_deposit_address(self, depositAddress, currency: Currency = None):
|
1804
|
+
def parse_deposit_address(self, depositAddress, currency: Currency = None) -> DepositAddress:
|
1681
1805
|
#
|
1682
1806
|
# [
|
1683
1807
|
# {
|
@@ -1699,9 +1823,9 @@ class idex(Exchange, ImplicitAPI):
|
|
1699
1823
|
return {
|
1700
1824
|
'info': depositAddress,
|
1701
1825
|
'currency': None,
|
1826
|
+
'network': 'MATIC',
|
1702
1827
|
'address': address,
|
1703
1828
|
'tag': None,
|
1704
|
-
'network': 'MATIC',
|
1705
1829
|
}
|
1706
1830
|
|
1707
1831
|
def sign(self, path, api='public', method='GET', params={}, headers=None, body=None):
|