- pipmath
- constants
- __init__
- signatures
- idex_types
- idex_types.websocket.guards
- idex_types.websocket.constants
- idex_types.websocket.request
- idex_types.websocket
- idex_types.websocket.response
- WebSocketResponseTickerShort
- WebSocketResponseCandleShort
- WebSocketResponseCandleLong
- WebSocketResponseTradeShort
- WebSocketResponseLiquidityPoolShort
- WebSocketResponseLiquidityPoolLong
- WebSocketResponseL1OrderBookShort
- WebSocketResponseL1OrderBookLong
- WebSocketResponseL2OrderBookShort
- WebSocketResponseL2OrderBookLong
- WebSocketResponseBalanceShort
- WebSocketResponseBalanceLong
- WebSocketResponseOrderFillShort
- WebSocketResponseOrderShort
- WebSocketResponseOrderLong
- WebSocketResponseTokenPriceShort
- WebSocketResponseTokenPriceLong
- WebSocketResponseError
- WebSocketResponseSubscriptions
- idex_types.enums
- idex_types.order_book
- idex_types.errors
- idex_types.rest.guards
- idex_types.rest.request
- RestRequestFindLiquidityPools
- RestRequestAddLiquidity
- RestRequestRemoveLiquidity
- RestRequestFindLiquidityAddition
- RestRequestFindLiquidityRemoval
- RestRequestFindLiquidityChanges
- RestRequestCancelOrders
- RestRequestFindBalances
- RestRequestFindCandles
- RestRequestFindDeposit
- RestRequestFindDeposits
- RestRequestFindFill
- RestRequestFindFills
- RestRequestFindMarkets
- RestRequestFindOrder
- RestRequestFindOrders
- RestRequestFindTrades
- RestRequestFindWithdrawal
- RestRequestFindWithdrawals
- RestRequestAssociateWallet
- idex_types.rest
- idex_types.rest.response
- RestResponseBalance
- RestResponseCandle
- RestResponseDeposit
- RestResponseExchangeInfo
- RestResponseOrderFill
- RestResponseFill
- RestResponseLiquidityPool
- RestResponseLiquidityAddition
- RestResponseLiquidityPoolReserves
- RestResponseLiquidityRemoval
- RestResponseMarket
- RestResponseOrder
- RestResponseTicker
- RestResponseTrade
- RestResponseUser
- RestResponseWallet
- RestResponseWithdrawal
- RestResponseAssociateWallet
- order_book
- order_book.api_conversions
- order_book.hybrid
- order_book.quantities
- calculate_gross_base_quantity
- calculate_gross_base_value_of_buy_quantities
- calculate_gross_quote_quantity
- calculate_gross_quote_value_of_sell_quantities
- calculate_base_quantity_out
- calculate_quote_quantity_out
- calculate_synthetic_price_levels
- recalculate_hybrid_level_amounts
- sort_and_merge_levels_unadjusted
- quantities_available_from_pool_at_ask_price
- quantities_available_from_pool_at_bid_price
- aggregate_l2_order_book_at_tick_size
- l1_or_l2_best_available_prices
- l1_l2_order_books_with_minimum_taker
- validate_synthetic_price_level_inputs
- adjust_price_to_tick_size
- order_book.utils
- client
- client.websocket.client
- client.websocket
- client.websocket.utils
- client.websocket.transform
- client.utils
- client.order_book
- client.order_book.real_time
- client.order_book.utils
- client.rest.public
- client.rest
- client.rest.authenticated
- RestAuthenticatedClient
- add_liquidity
- remove_liquidity
- get_liquidity_addition
- get_liquidity_additions
- get_liquidity_removal
- get_liquidity_removals
- get_user
- get_wallets
- get_balances
- associate_wallet
- create_order
- create_test_order
- cancel_order
- cancel_orders
- get_order
- get_orders
- get_fill
- get_fills
- get_deposit
- get_deposits
- withdraw
- get_withdrawal
- get_withdrawals
- get_ws_token
- RestAuthenticatedClient
def create_private_key_message_signer(
wallet_private_key: str) -> MessageSignerReturns a function which signs a message with the originally provided private key.
Arguments:
wallet_private_key- Private key to use when signing messages
Returns:
The message signing function
class WebSocketRequestTickersSubscription(TypedDict)Tickers subscription
Attributes:
name- 'tickers'markets- array of market symbols
class WebSocketRequestCandlesSubscription(TypedDict)Candles subscription
Attributes:
name- 'candles'markets- array of market symbolsinterval- candle interval
class WebSocketRequestTokenPriceSubscription(TypedDict)Token price subscription
Attributes:
name- 'tokenprice'markets- array of market symbols
class WebSocketRequestTradesSubscription(TypedDict)Trades subscription
Attributes:
name- 'trades'markets- array of market symbols
class WebSocketRequestL1OrderBookSubscription(TypedDict)L1 order book subscription
Attributes:
name- 'l1orderbook'markets- array of market symbols
class WebSocketRequestL2OrderBookSubscription(TypedDict)L2 order book subscription
Attributes:
name- 'l2orderbook'markets- array of market symbols
class WebSocketRequestWallet(TypedDict)wallet is required and is only handled by the idex-sdk. It is used to auto generate the required wsToken
class WebSocketResponseTickerShort(TypedDict)Attributes:
m- (market) Market symbolt- (time) Timestamp when the statistics were computed, the opening time of the period is 24 hours prioro- (open) Price of the first trade in the period in quote termsh- (high) Highest traded price in the period in quote termsl- (low) Lowest traded price in the period in quote termsc- (close) Price of the last trade in the period in quote termsQ- (closeQuantity) Quantity of the last trade in th period in base termsv- (baseVolume) Trailing 24-hour trading volume in base termsq- (quoteVolume) Trailing 24-hour trading volume in quote termsP- (percentChange) Percentage change from open price to close pricen- (numTrades) Number of trades in the perioda- (ask) Best ask price on the order book in quote termsb- (bid) Best bid price on the order book in quote termsu- (sequence) Fill sequence number of the last trade in the period
class WebSocketResponseCandleShort(TypedDict)Attributes:
m- (market) Market symbolt- (time) Timestamp when the statistics were computed, time is always between the start and end timestamps of the intervali- (interval) Interval duration, see Interval Valuess- (start) Timestamp of the start of the intervale- (end) Timestamp of the end of the intervalo- (open) Price of the first trade in the interval in quote termsh- (high) Highest traded price in the interval in quote termsl- (low) Lowest traded price in the interval in quote termsc- (close) Price of the last trade in the interval in quote termsv- (volume) Trading volume in the interval in base termsn- (numTrades) Number of trades in the candleu- (sequence) Fill sequence number of the last trade in the interval
class WebSocketResponseCandleLong(rest_response.RestResponseCandle)Attributes:
market- Market symboltime- Timestamp when the statistics were computed, time is always between the start and end timestamps of the intervalinterval- Interval duration, see Interval Valuesstart- Timestamp of the start of the intervalend- Timestamp of the end of the intervalopen- Price of the first trade in the interval in quote termshigh- Highest traded price in the interval in quote termslow- Lowest traded price in the interval in quote termsclose- Price of the last trade in the interval in quote termsvolume- Trading volume in the interval in base termsnumTrades- Number of trades in the candlesequence- Fill sequence number of the last trade in the interval
class WebSocketResponseTradeShort(TypedDict)Attributes:
y- (type) orderBook, pool, or hybridm- (market) Market symboli- (fillId) Trade identifierp- (price) Price of the trade in quote termsq- (quantity) Quantity of the trade in base termsQ- (quoteQuantity) Quantity of the trade in quote termst- (time) Timestamp of the trades- (makerSide) Maker side of the trade, buy or sellu- (sequence) Fill sequence number of the trade
class WebSocketResponseLiquidityPoolShort(TypedDict)Attributes:
q- (baseReserveQuantity) quantity of base asset held in the liquidity poolQ- (quoteReserveQuantity) quantity of quote asset held in the liquidity pool
class WebSocketResponseLiquidityPoolLong(TypedDict)Attributes:
baseReserveQuantity- quantity of base asset held in the liquidity poolquoteReserveQuantity- quantity of quote asset held in the liquidity pool
class WebSocketResponseL1OrderBookShort(TypedDict)Attributes:
m- (market) Market symbolt- (time) Timestamp of the order book updateb- (bidPrice) Best bid priceB- (bidQuantity) Quantity available at the best bid pricea- (askPrice) Best ask priceA- (askQuantity) Quantity available at the best ask pricep- Liquidity pool reserves for this market
class WebSocketResponseL1OrderBookLong(TypedDict)Attributes:
market- Market symboltime- Timestamp of the order book updatebidPrice- Best bid pricebidQuantity- Quantity available at the best bid priceaskPrice- Best ask priceaskQuantity- Quantity available at the best ask pricepool- Liquidity pool reserves for this market
class WebSocketResponseL2OrderBookShort(TypedDict)Attributes:
m- (market) Market symbolt- (time) Timestamp of the order book updateu- (sequence) Order book update sequence number of the updateb- (bids) Array of bid price level updatesa- (asks) Array of ask price level updatesp- Liquidity pool reserves for this market
class WebSocketResponseL2OrderBookLong(TypedDict)Attributes:
market- Market symboltime- Timestamp of the order book updatesequence- Order book update sequence number of the updatebids- Array of bid price level updatesasks- Array of ask price level updatespool- liquidity pool reservesp- Liquidity pool reserves for this market
class WebSocketResponseBalanceShort(TypedDict)Attributes:
w- (wallet) Target wallet addressa- (asset) Asset symbolq- (quantity) Total quantity of the asset held by the wallet on the exchangef- (availableForTrade) Quantity of the asset available for trading; quantity: lockedl- (locked) Quantity of the asset held in trades on the order bookd- (usdValue) Total value of the asset held by the wallet on the exchange in USD
class WebSocketResponseBalanceLong(TypedDict)Attributes:
wallet- Target wallet addressasset- Asset symbolquantity- Total quantity of the asset held by the wallet on the exchangeavailableForTrade- Quantity of the asset available for trading; quantity: lockedlocked- Quantity of the asset held in trades on the order bookusdValue- Total value of the asset held by the wallet on the exchange in USD
class WebSocketResponseOrderFillShort(
_WebSocketResponseOrderFillShortRequiredAttribs)Attributes:
i- (fillId) Fill identifierp- (price) Price of the fill in quote termsq- (quantity) Quantity of the fill in base termsQ- (quoteQuantity) Quantity of the fill in quote termsoq- Quantity of the fill in base terms supplied by order book liquidity, omitted for pool fillsoQ- Quantity of the fill in quote terms supplied by order book liquidity, omitted for pool fillspq- Quantity of the fill in base terms supplied by pool liquidity, omitted for orderBook fillspQ- Quantity of the fill in quote terms supplied by pool liquidity, omitted for orderBook fillst- (time) Timestamp of the fills- (makerSide) Maker side of the fill, buy or sellu- (sequence) Fill sequence numberf- (fee) Fee amount collected on the filla- (feeAsset) Symbol of asset in which fees collectedg- (gas) Amount collected to cover trade settlement gas costs, only present for takerl- (liquidity) Whether the fill is the maker or taker in the trade from the perspective of the requesting user account, maker or takerT- (txId) Ethereum ID of the trade settlement transactionS- (txStatus) Status of the trade settlement transaction, see values
class WebSocketResponseOrderShort(_WebSocketResponseOrderShortRequiredAttribs)Attributes:
m- (market) Market symboli- (orderId) Exchange-assigned order identifierc- (clientOrderId) Client-specified order identifier w : (wallet) Ethereum address of placing wallett- (executionTime) Timestamp of the most recent updateT- (time) Timestamp of initial order processing by the matching enginex- (update) Type of order update, see valuesX- (status) Order status, see valuesu- (sequence) order book update sequence number, only included if update type triggers an order book updateo- (type) Order type, see valuesS- (side) Order side, buy or sellq- (originalQuantity) Original quantity specified by the order in base terms, omitted for market orders specified in quote termsQ- (originalQuoteQuantity) Original quantity specified by the order in quote terms, only present for market orders specified in quote termz- (executedQuantity) Quantity that has been executed in base termsZ- (cumulativeQuoteQuantity) Cumulative quantity that has been spent (buy orders) or received (sell orders) in quote terms, omitted if unavailable for historical ordersv- (avgExecutionPrice) Weighted average price of fills associated with the order; only present with fillsp- (price) Original price specified by the order in quote terms, omitted for all market ordersP- (stopPrice) Stop loss or take profit price, only present for stopLoss, stopLossLimit, takeProfit, and takeProfitLimit ordersf- (timeInForce) Time in force policy, see values, only present for limit ordersV- (selfTradePrevention) Self-trade prevention policy, see valuesF- (fills) Array of order fill objects
class WebSocketResponseOrderLong(_WebSocketResponseOrderLongRequiredAttribs)Attributes:
market- Market symbolorderId- Exchange-assigned order identifierclientOrderId- Client-specified order identifierwallet- Ethereum address of placing walletexecutionTime- Timestamp of the most recent updatetime- Timestamp of initial order processing by the matching engineupdate- Type of order update, see valuesstatus- Order status, see valuessequence- order book update sequence number, only included if update type triggers an order book updatetype- Order type, see valuesside- Order side, buy or selloriginalQuantity- Original quantity specified by the order in base terms, omitted for market orders specified in quote termsoriginalQuoteQuantity- Original quantity specified by the order in quote terms, only present for market orders specified in quote termsexecutedQuantity- Quantity that has been executed in base termscumulativeQuoteQuantity- Cumulative quantity that has been spent (buy orders) or received (sell orders) in quote terms, omitted if unavailable for historical ordersavgExecutionPrice- Weighted average price of fills associated with the order; only present with fillsprice- Original price specified by the order in quote terms, omitted for all market ordersstopPrice- Stop loss or take profit price, only present for stopLoss, stopLossLimit, takeProfit, and takeProfitLimit orderstimeInForce- Time in force policy, see values, only present for limit ordersselfTradePrevention- Self-trade prevention policy, see valuesfills- Array of order fill objects
class WebSocketResponseTokenPriceShort(TypedDict)Attributes:
t- (token) Token symbolp- (price) Current price of token relative to the native asset
class WebSocketResponseTokenPriceLong(TypedDict)Attributes:
token- Token symbolprice- Current price of token relative to the native asset
class WebSocketResponseError(_WebSocketResponseErrorRequiredAttribs)Error response
Attributes:
cid error data
data.code- error short codedata.message- human readable error message
class WebSocketResponseSubscriptions(
_WebSocketResponseSubscriptionsRequiredAttribs)Subscriptions response
Attributes:
cid
type- subscriptions subscriptionsSubscription.name- subscription nameSubscription.markets- marketsSubscription.interval- candle intervalSubscription.wallet- wallet address
class OrderBookFeesAndMinimums(TypedDict)Attributes:
takerIdexFeeRate- Taker trade fee rate collected by IDEX; used in computing synthetic price levels for real-time order booktakerLiquidityProviderFeeRate- Taker trade fee rate collected by liquidity providers; used in computing synthetic price levels for real-time order booktakerTradeMinimum- Minimum order size that is accepted by the matching engine for execution in MATIC, applies to both MATIC and token
class RestRequestFindLiquidityPools(TypedDict)Attributes:
market- Target markettokenA- Address of one reserve tokentokenB- Address of one reserve token
class RestRequestAddLiquidity(TypedDict)Attributes:
nonce- UUIDv1wallet- Ethereum wallet addresstokenA- Asset by addresstokenB- Asset by addressamountADesired- Maximum amount of tokenA to add to the liquidity poolamountBDesired- Maximum amount of tokenB to add to the liquidity poolamountAMin- Minimum amount of tokenA to add to the liquidity poolamountBMin- Minimum amount of tokenB to add to the liquidity poolto- Wallet to credit LP tokens, or the custodian contract address to leave on exchange
class RestRequestRemoveLiquidity(TypedDict)Attributes:
nonce- UUIDv1wallet- Ethereum wallet addresstokenA- Asset by addresstokenB- Asset by addressliquidity- LP tokens to burnamountAMin- Minimum amount of tokenA to add to the liquidity poolamountBMin- Minimum amount of tokenB to add to the liquidity poolto- Wallet to credit LP tokens, or the custodian contract address to leave on exchange
class RestRequestFindLiquidityAddition(RestRequestFindLiquidityChange,
RestRequestFindWithPagination)Attributes:
nonce- UUIDv1wallet- Ethereum wallet addressliquidityAdditionId- Single liquidityAdditionId to return; exclusive with initiatingTxIdinitiatingTxId- Transaction id of the Exchange contract addLiquidity or addLiquidityETH call transaction, only applies to chain-initiated liquidity additions; exclusive with liquidityAdditionIdstart- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000fromId- Liquidity additions created at the same timestamp or after fromId
class RestRequestFindLiquidityRemoval(RestRequestFindLiquidityChange,
RestRequestFindWithPagination)Attributes:
nonce- UUIDv1wallet- Ethereum wallet addressliquidityRemovalId- Single liquidityRemovalId to return; exclusive with initiatingTxIdinitiatingTxId- Transaction id of the Exchange contract removeLiquidity or removeLiquidityETH call transaction, only applies to chain-initiated liquidity removals; exclusive with liquidityRemovalIdstart- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000fromId- Liquidity additions created at the same timestamp or after fromId
class RestRequestFindLiquidityChanges(
_RestRequestFindLiquidityChangesRequiredAttribs)Attributes:
nonce- UUIDv1wallet- Ethereum wallet addressstart- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000fromId- Deposits created at the same timestamp or after fromId
class RestRequestCancelOrders(RestRequestCancelOrdersBase)Attributes:
nonce- UUIDv1wallet- Ethereum wallet addressmarket- Base-quote pair e.g. 'IDEX-ETH'
class RestRequestFindBalances(RestRequestFindByWallet)Attributes:
nonce- UUIDv1wallet- Ethereum wallet addressassets- Asset symbols
class RestRequestFindCandles(RestRequestFindWithPagination)Attributes:
market- Base-quote pair e.g. 'IDEX-ETH'interval- Time interval for datastart- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000
class RestRequestFindDeposit(RestRequestFindByWallet)Attributes:
nonce- UUIDv1 wallet depositId
class RestRequestFindDeposits(RestRequestFindByWallet,
RestRequestFindWithPagination)Attributes:
nonce- UUIDv1 walletasset- Asset by symbolstart- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000fromId- Deposits created at the same timestamp or after fromId
class RestRequestFindFill(RestRequestFindByWallet)Attributes:
nonce- UUIDv1 wallet fillId
class RestRequestFindFills(RestRequestFindByWallet,
RestRequestFindWithPagination)Attributes:
nonce- UUIDv1wallet- Ethereum wallet addressmarket- Base-quote pair e.g. 'IDEX-ETH'start- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000fromId- Fills created at the same timestamp or after fillId
class RestRequestFindMarkets(TypedDict)Attributes:
market- Target market, all markets are returned if omitted
class RestRequestFindOrder(RestRequestFindByWallet)Attributes:
nonce- UUIDv1 walletorderId- Single orderId or clientOrderId to cancel; prefix client-provided ids with client
class RestRequestFindOrders(RestRequestFindByWallet,
RestRequestFindWithPagination)Attributes:
nonce- UUIDv1 walletmarket- Base-quote pair e.g. 'IDEX-ETH'closed- false only returns active orders on the order book; true only returns orders that are no longer on the order book and resulted in at least one fill; only applies if orderId is absentstart- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000fromId- order_id of the earliest (oldest) order, only applies if orderId is absent
class RestRequestFindTrades(RestRequestFindWithPagination)Attributes:
market- Base-quote pair e.g. 'IDEX-ETH'start- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000fromId- Trades created at the same timestamp or after from_id
class RestRequestFindWithdrawal(RestRequestFindByWallet)Attributes:
nonce- UUIDv1 wallet withdrawalId
class RestRequestFindWithdrawals(RestRequestFindByWallet,
RestRequestFindWithPagination)Attributes:
nonce- UUIDv1 walletasset- Asset by symbolassetContractAddress- Asset by contract addressstart- Starting timestamp (inclusive)end- Ending timestamp (inclusive)limit- Max results to return from 1-1000fromId- Withdrawals created after the fromId
class RestRequestAssociateWallet(TypedDict)Attributes:
nonce- UUIDv1wallet- The wallet to associate with the authenticated account
class RestResponseBalance(TypedDict)Attributes:
asset- Asset symbolquantity- Total quantity of the asset held by the wallet on the exchangeavailableForTrade- Quantity of the asset available for trading; quantity: lockedlocked- Quantity of the asset held in trades on the order bookusdValue- Total value of the asset held by the wallet on the exchange in USD
class RestResponseCandle(TypedDict)Attributes:
start- Time of the start of the intervalopen- Price of the first fill of the interval in quote termshigh- Price of the highest fill of the interval in quote termslow- Price of the lowest fill of the interval in quote termsclose- Price of the last fill of the interval in quote termsvolume- Total volume of the period in base termssequence- Fill sequence number of the last trade in the interval
class RestResponseDeposit(TypedDict)Asset deposits into smart contract
Attributes:
depositId- IDEX-issued deposit identifierasset- Asset by symbolquantity- Deposit amount in asset termstxId- Ethereum transaction hashtxTime- Timestamp of the Ethereum deposit transactionconfirmationTime- Timestamp of credit on IDEX including block confirmations
class RestResponseExchangeInfo(TypedDict)Attributes:
timeZone- Server time zone, always UTCserverTime- Current server timematicDepositContractAddress- Polygon address of the exchange smart contract for depositsmaticCustodyContractAddress- Polygon address of the custody smart contract for certain add and remove liquidity callsmaticUsdPrice- Current price of MATIC in USDgasPrice- Current gas price used by the exchange for trade settlement and withdrawal transactions in Gweivolume24hUsd- Total exchange trading volume for the trailing 24 hours in USDtotalVolumeUsd- Total exchange trading volume for IDEX v3 on Polygon in USDtotalTrades- Total number of trade executions for IDEX v3 on PolygontotalValueLockedUsd- Total value locked in IDEX v3 on Polygon in USDidexTokenAddress- Token contract address for the IDEX token on PolygonidexUsdPrice- Current price of the IDEX token in USDidexMarketCapUsd- Market capitalization of the IDEX token in USDmakerFeeRate- Maker trade fee ratetakerFeeRate- Total taker trade fee ratetakerIdexFeeRate- Taker trade fee rate collected by IDEX; used in computing synthetic price levels for real-time order bookstakerLiquidityProviderFeeRate- Taker trade fee rate collected by liquidity providers; used in computing synthetic price levels for real-time order booksmakerTradeMinimum- Minimum size of an order that can rest on the order book in MATIC, applies to both MATIC and tokenstakerTradeMinimum- Minimum order size that is accepted by the matching engine for execution in MATIC, applies to both MATIC and tokenswithdrawMinimum- Minimum withdrawal amount in MATIC, applies to both MATIC and tokensliquidityAdditionMinimum- Minimum liquidity addition amount in MATIC, applies to both MATIC and tokensliquidityRemovalMinimum- Minimum withdrawal amount in MATIC, applies to both MATIC and tokensblockConfirmationDelay- Minimum number of block confirmations before on-chain transactions are processed
class RestResponseOrderFill(_RestResponseOrderFillRequiredAttribs)Attributes:
fillId- Internal ID of fillprice- Executed price of fill in quote termsquantity- Executed quantity of fill in base termsquoteQuantity- Executed quantity of trade in quote termsorderBookQuantity- Quantity of the fill in base terms supplied by order book liquidity, omitted for pool fillsorderBookQuoteQuantity- Quantity of the fill in quote terms supplied by order book liquidity, omitted for pool fillspoolQuantity- Quantity of the fill in base terms supplied by pool liquidity, omitted for orderBook fillspoolQuoteQuantity- Quantity of the fill in quote terms supplied by pool liquidity, omitted for orderBook fillstime- Fill timestampmakerSide- Which side of the order the liquidity maker was onsequence- Last trade sequence number for the marketfee- Fee amount on fillfeeAsset- Which token the fee was taken in gas liquiditytype- orderBook, pool, or hybridtxId- Ethereum transaction ID, if availabletxStatus- Ethereum transaction status
class RestResponseFill(_RestResponseFillRequiredAttribs)Attributes:
fillId- Internal ID of fillprice- Executed price of fill in quote termsquantity- Executed quantity of fill in base termsquoteQuantity- Executed quantity of fill in quote termsorderBookQuantity- Quantity of the fill in base terms supplied by order book liquidity, omitted for pool fillsorderBookQuoteQuantity- Quantity of the fill in quote terms supplied by order book liquidity, omitted for pool fillspoolQuantity- Quantity of the fill in base terms supplied by pool liquidity, omitted for orderBook fillspoolQuoteQuantity- Quantity of the fill in quote terms supplied by pool liquidity, omitted for orderBook fillstime- Fill timestampmakerSide- Which side of the order the liquidity maker was onsequence- Last trade sequence number for the marketmarket- Base-quote pair e.g. 'IDEX-ETH'orderId- Internal ID of orderclientOrderId- Client-provided ID of orderside- Orders side, buy or sellfee- Fee amount on fillfeeAsset- Which token the fee was taken ingas- Amount collected to cover trade settlement gas costs, only present for takerliquidity- Whether the fill is the maker or taker in the trade from the perspective of the requesting API account, maker or takertype- Fill typetxId- Ethereum transaction ID, if availabletxStatus- Ethereum transaction status
class RestResponseLiquidityPool(TypedDict)Attributes:
tokenA- Address of one reserve tokentokenB- Address of one reserve tokenreserveA- Quantity of token A held as reserve in token precision, not pipsreserveB- Quantity of token B held as reserve in token precision, not pipsliquidityToken- Address of the liquidity provider (LP) tokentotalLiquidity- Total quantity of liquidity provider (LP) tokens minted in token precision, not pipsreserveUsd- Total value of reserves in USDmarket- Market symbol of pool's associated hybrid market
class RestResponseLiquidityAddition(RestResponseLiquidityBase)Attributes:
liquidityAdditionId- Internal ID of liquidity additiontokenA- Asset symboltokenB- Asset symbolamountA- Amount of tokenA added to the liquidity poolamountB- Amount of tokenB added to the liquidity poolliquidity- Amount of liquidity provided (LP) tokens mintedtime- Liquidity addition timestampinitiatingTxId- On chain initiated transaction ID, if availableerrorCode- Error short code present on liquidity addition errorerrorMessage- Human-readable error message present on liquidity addition errorfeeTokenA- Amount of tokenA collected as feesfeeTokenB- Amount of tokenB collected as feestxId- Ethereum transaction ID, if availabletxStatus- Ethereum transaction status
class RestResponseLiquidityPoolReserves(TypedDict)Attributes:
baseReserveQuantity- reserve quantity of base asset in poolquoteReserveQuantity- reserve quantity of quote asset in pool
class RestResponseLiquidityRemoval(RestResponseLiquidityBase)Attributes:
liquidityRemovalId- Internal ID of liquidity removaltokenA- Asset symboltokenB- Asset symbolamountA- Amount of tokenA added to the liquidity poolamountB- Amount of tokenB added to the liquidity poolliquidity- Amount of liquidity provided (LP) tokens mintedtime- Liquidity addition timestampinitiatingTxId- On chain initiated transaction ID, if availableerrorCode- Error short code present on liquidity addition errorerrorMessage- Human-readable error message present on liquidity addition errorfeeTokenA- Amount of tokenA collected as feesfeeTokenB- Amount of tokenB collected as feestxId- Ethereum transaction ID, if availabletxStatus- Ethereum transaction status
class RestResponseMarket(TypedDict)Attributes:
market- Market symboltype- Market typestatus- Market trading statusbaseAsset- Base asset symbolbaseAssetPrecision- Exchange decimal precision of the base asset, always 8 due to precision normalizationquoteAsset- Quote asset symbolquoteAssetPrecision- Exchange decimal precision of the base asset, always 8 due to precision normalizationmakerFeeRate- Maker trade fee ratetakerFeeRate- Total taker trade fee ratetakerIdexFeeRate- Taker trade fee rate collected by IDEX; used in computing synthetic price levels for real-time order bookstakerLiquidityProviderFeeRate- Taker trade fee rate collected by liquidity providers; used in computing synthetic price levels for real-time order bookstickSize- Market tick size (minimum change in order price)
class RestResponseOrder(_RestResponseOrderRequiredAttribs)Attributes:
market- Market symbol as base-quote pair e.g. 'IDEX-ETH'orderId- Exchange-assigned order identifierclientOrderId- Client-specified order identifierwallet- Ethereum address of placing wallettime- Time of initial order processing by the matching enginestatus- Current order statuserrorCode- Error short code explaining order error or failed batch cancelerrorMessage- Error description explaining order error or failed batch canceltype- Order typeside- Order sideoriginalQuantity- Original quantity specified by the order in base terms, omitted for market orders specified in quote termsoriginalQuoteQuantity- Original quantity specified by the order in quote terms, only present for market orders specified in quote termsexecutedQuantity- Quantity that has been executed in base termscumulativeQuoteQuantity- Cumulative quantity that has been spent (buy orders) or received (sell orders) in quote terms, omitted if unavailable for historical ordersavgExecutionPrice- Weighted average price of fills associated with the order; only present with fills price - Original price specified by the order in quote terms, omitted for all market ordersstopPrice- Stop loss or take profit price, only present for stopLoss, stopLossLimit, takeProfit, and takeProfitLimit orderstimeInForce- Time in force policy, see values, only present for limit ordersselfTradePrevention- Self-trade prevention policy, see valuesfills- Array of order fill objects
class RestResponseTicker(TypedDict)Attributes:
market- Base-quote pair e.g. 'IDEX-ETH'time- Time when data was calculated, open and change is assumed to be trailing 24hopen- Price of the first trade for the period in quote termshigh- Highest traded price in the period in quote termslow- Lowest traded price in the period in quote termsclose- Same as lastcloseQuantity- Quantity of the last period in base termsbaseVolume- 24h volume in base termsquoteVolume- 24h volume in quote termspercentChange- % change from open to closenumTrades- Number of fills for the market in the periodask- Best ask price on the order bookbid- Best bid price on the order booksequence- Last trade sequence number for the market
class RestResponseTrade(TypedDict)Attributes:
fillId- Internal ID of fillprice- Executed price of trade in quote termsquantity- Executed quantity of trade in base termsquoteQuantity- Executed quantity of trade in quote termstime- Fill timestampmakerSide- Which side of the order the liquidity maker was ontype- orderBook, pool, or hybridsequence- Last trade sequence number for the market
class RestResponseUser(TypedDict)Attributes:
depositEnabled- Deposits are enabled for the user accountorderEnabled- Placing orders is enabled for the user accountcancelEnabled- Cancelling orders is enabled for the user accountwithdrawEnabled- Withdrawals are enabled for the user accounttotalPortfolioValueUsd- Total value of all holdings deposited on the exchange, for all wallets associated with the user account, in USDmakerFeeRate- User-specific maker trade fee ratetakerFeeRate- User-specific taker trade fee ratetakerIdexFeeRate- User-specific liquidity pool taker IDEX fee ratetakerLiquidityProviderFeeRate- User-specific liquidity pool taker LP provider fee rate
class RestResponseWallet(TypedDict)Attributes:
address- Ethereum address of the wallettotalPortfolioValueUsd- Total value of all holdings deposited on the exchange for the wallet in USDtime- Timestamp of association of the wallet with the user account
class RestResponseWithdrawal(RestResponseWithdrawalBase)Attributes:
withdrawalId- Exchange-assigned withdrawal identifierasset- Symbol of the withdrawn asset, exclusive with assetContractAddressassetContractAddress]- Token contract address of withdrawn asset, exclusive with assetquantity- Quantity of the withdrawaltime- Timestamp of withdrawal API requestfee- Amount deducted from withdrawal to cover IDEX-paid gastxId- Ethereum transaction ID, if availabletxStatus- Ethereum transaction status
class RestResponseAssociateWallet(TypedDict)Attributes:
address- Ethereum address of the wallettotalPortfolioValueUsd- Total value of all holdings deposited on the exchange for the wallet in USDtime- Timestamp of association of the wallet with the user account
def l2_limit_order_book_to_hybrid_order_books(
order_book: L2OrderBook,
idex_fee_rate: int,
pool_fee_rate: int,
include_minimum_taker_levels: bool,
minimum_taker_in_quote: Optional[int],
tick_size: int,
visible_levels: int = 10,
visible_slippage: int = 100) -> L1AndL2OrderBookConvert a limit-order orderbook and a liquidity pool to a hybrid order book representation
Arguments:
order_book- L2 book, e.g. from GET /v1/orderbook?level=2&limitOrderOnly=truevisible_levels- number of price levels to calculate, default = 10 asks, 10 bidsvisible_slippage- price slippage per level, in increments of 0.001%, default = 100 (0.1%)idex_fee_rate- trade fee rate charged by IDEX, expressed in pipspool_fee_rate- pool fee rate chared by liquidity pool, expressed in pipsinclude_minimum_taker_levels- if true, calculate a synthetic price level at twice the minimum trade sizeminimum_taker_in_quote- minimum trade size expressed in pips, or null if none availabletick_size- minimum price movement expressed in pips (10^-8)
def calculate_gross_base_quantity(base_asset_quantity: int,
quote_asset_quantity: int, target_price: int,
idex_fee_rate: int,
pool_fee_rate: int) -> intHelper function to calculate gross base quantity available at a bid price. See quantities_available_from_pool_at_bid_price.
def calculate_gross_base_value_of_buy_quantities(
base_asset_quantity: int, quote_asset_quantity: int,
gross_quote_quantity: int) -> intHelper function to convert from quote to base quantities. See quantities_available_from_pool_at_ask_price.
def calculate_gross_quote_quantity(base_asset_quantity: int,
quote_asset_quantity: int,
target_price: int, idex_fee_rate: int,
pool_fee_rate: int) -> intHelper function to calculate gross quote available at a bid price. See quantities_available_from_pool_at_bid_price.
def calculate_gross_quote_value_of_sell_quantities(
base_asset_quantity: int, quote_asset_quantity: int,
gross_base_quantity: int) -> intHelper function to convert from base to quote quantities. See quantities_available_from_pool_at_bid_price.
def calculate_base_quantity_out(base_asset_quantity: int,
quote_asset_quantity: int,
gross_quote_quantity_in: int,
idex_fee_rate: int, pool_fee_rate: int) -> intGiven a taker order size expressed in quote, how much base is received from the pool. See l1or_l2_best_available_prices.
def calculate_quote_quantity_out(base_asset_quantity: int,
quote_asset_quantity: int,
gross_base_quantity_in: int,
idex_fee_rate: int,
pool_fee_rate: int) -> intGiven a taker order size expressed in base, how much quote is received from the pool. See l1_or_l2_best_available_prices.
def calculate_synthetic_price_levels(
base_asset_quantity: int,
quote_asset_quantity: int,
visible_levels: int,
visible_slippage: int,
idex_fee_rate: int = 0,
pool_fee_rate: int = 0,
tick_size: int = 1) -> SyntheticL2OrderBookGenerates a synthetic orderbook consisting of price levels for pool liquidity only
Arguments:
base_asset_quantity- pool reserve in base asset, must be at least 1.0 expressed in pips (10^-8)quote_asset_quantity- pool reserve in quote asset, must be at least 1.0 expressed in pips (10^-8)visible_levels- how many ask and bid price levels to generate (of each)visible_slippage- how much slippage per price level, in 1/1000th of a percent (100 = 0.1%)idex_fee_rate- the idex fee rate to use for calculations (query /v1/exchange for current global setting)pool_fee_rate- the liquidity pool fee rate to use for calculations (query /v1/exchange for current global setting)tick_size- minimum price movement expressed in pips (10^-8)
Returns:
A level 2 order book with synthetic price levels only
def recalculate_hybrid_level_amounts(orderbook: L2OrderBook,
idex_fee_rate: int,
pool_fee_rate: int) -> L2OrderBookRecalculate price level quantities for a book previously sorted with sort_and_merge_levels_unadjusted
Arguments:
orderbook- an unadjusted level 2 order book as returned by {sortAndMergeLevelsUnadjusted}idex_fee_rate- idex fee rate to use in pool quantity calculationspool_fee_rate- pool fee rate to use in pool quantity calculations
def sort_and_merge_levels_unadjusted(
limit_order_levels: List[OrderBookLevelL2],
synthetic_levels: List[OrderBookLevelL2],
is_before: Callable[[OrderBookLevelL2, OrderBookLevelL2], bool]
) -> List[OrderBookLevelL2]Combines limit orders and synthetic price levels into an intermediate sorted state IMPORTANT: this function does not update price level quantities after merging
Arguments:
limit_order_levels- a level 2 orderbook with only limit orderssynthetic_levels- a level 2 orderbook with only synthetic ordersis_before- comparison function for sorting price levels
Returns:
Level 2 order book with synthetic price levels only
def quantities_available_from_pool_at_ask_price(
base_asset_quantity: int, quote_asset_quantity: int, ask_price: int,
idex_fee_rate: int, pool_fee_rate: int) -> PriceLevelQuantitiesHelper function to calculate the asset quantities available at a given price level (pool liquidity only)
Arguments:
base_asset_quantity- pool reserve in base asset, must be at least 1.0 expressed in pips (10^-8)quote_asset_quantity- pool reserve in quote asset, must be at least 1.0 expressed in pips (10^-8)ask_price- the ask price level to calculate quantities foridex_fee_rate- the idex fee rate to use for calculations (query /v1/exchange for current global setting)pool_fee_rate- the liquidity pool fee rate to use for calculations (query /v1/exchange for current global setting)
Returns:
Level 2 order book with synthetic price levels only
def quantities_available_from_pool_at_bid_price(
base_asset_quantity: int, quote_asset_quantity: int, bid_price: int,
idex_fee_rate: int, pool_fee_rate: int) -> PriceLevelQuantitiesHelper function to calculate the asset quantities available at a given price level (pool liquidity only)
Arguments:
base_asset_quantity- pool reserve in base asset, must be at least 1.0 expressed in pips (10^-8)quote_asset_quantity- pool reserve in quote asset, must be at least 1.0 expressed in pips (10^-8)bid_price- the bid price level to calculate quantities foridex_fee_rate- the idex fee rate to use for calculations (query /v1/exchange for current global setting)pool_fee_rate- the liquidity pool fee rate to use for calculations (query /v1/exchange for current global setting)
Returns:
Level 2 order book with synthetic price levels only
def aggregate_l2_order_book_at_tick_size(input_book: L2OrderBook,
tick_size: int) -> L2OrderBookHelper function to re-aggregate L2 orderbook price levels at a larger (more zeroes) tick size
def l1_or_l2_best_available_prices(pool: PoolReserveQuantities,
idex_fee_rate: int, pool_fee_rate: int,
taker_minimum_in_base: int,
taker_minimum_in_quote: int,
tick_size: int) -> BestAvailablePriceLevelsGiven a minimum taker order size, calculate the best achievable price level using pool liquidity only.
Arguments:
pool- pool reserve quantities for the orderbook in questionidex_fee_rate- the idex fee rate to use for pool calculationspool_fee_rate- the pool fee rate to use for pool calculationstaker_minimum_in_base- the minimum taker order size, expressed in base asset unitstaker_minimum_in_quote- the minimum taker order size, expressed in quote asset units
def l1_l2_order_books_with_minimum_taker(l2: L2OrderBook, idex_fee_rate: int,
pool_fee_rate: int,
taker_minimum_in_quote: int,
tick_size: int) -> L1AndL2OrderBookModifies an existing level 2 order book to include better price levels at the desired taker order size, if available from pool reserves.
Arguments:
pool- pool reserve quantities for the orderbook in questionidexFeeRate- the idex fee rate to use for pool calculationspoolFeeRate- the pool fee rate to use for pool calculationstakerMinimumInQuote- the minimum taker order size, expressed in quote asset units
Returns:
The resulting level 1 and level 2 orderbooks
def validate_synthetic_price_level_inputs(base_asset_quantity: int,
quote_asset_quantity: int,
target_price: int,
is_buy: bool) -> NoneValidates assumptions for reserve quantities and pricing required for quantity calculations
Arguments:
base_asset_quantity- pool reserve in base asset, must be at least 1.0 expressed in pips (10^-8)quote_asset_quantity- pool reserve in quote asset, must be at least 1.0 expressed in pips (10^-8)target_price- price expressed in pips, must be 0 < price < 2^64-1 and on the correct side of the spreadis_buy- if true, the price is targeting buy orders (bids), otherwise sell orders (asks)
Returns:
None, validation always succeeds or raises an exception
def adjust_price_to_tick_size(
price: int,
tick_size: int,
rounding_mode: RoundingMode = DEFAULT_ROUNDING_MODE) -> intAdjusts prices in pips to account for tick size by discarding insignificant digits using specified rounding mode. Ex price 123456789 at tick size 1 is 123456789, at tick size 10 123456780, at 100 123456700, etc
def l2_to_l1_order_book(l2: L2OrderBook) -> L1OrderBookDerive the level 1 orderbook from a level 2 orderbook
class WebSocketClient()WebSocket API client
When apiKey and apiSecret are provided, the client will automatically handle WebSocket authentication token generation and refresh. Omit when using only public WebSocket subscriptions.
def __init__(api_key: Optional[str] = None,
api_secret: Optional[str] = None,
should_reconnect_automatically: bool = False,
connect_timeout: Optional[int] = None,
sandbox: bool = False,
multiverse_chain: MultiverseChain = MultiverseChain.MATIC,
base_url: Optional[str] = None,
websocket_auth_token_fetch: Optional[Callable[[str],
str]] = None)Arguments:
api_key- Used to authenticate user when automatically refreshing WS tokenapi_secret- Used to compute HMAC signature when automatically refreshing WS token receiving push updates. Eg. {market}@{subscription}_{option}should_reconnect_automatically- If true, automatically reconnects when connection is closed by the server or network errorsconnect_timeout- Timeout (in milliseconds) before failing when trying to connect to the WebSocket. Defaults to 5000.sandbox- If true, client will point to API sandboxmultiverse_chain- Which multiverse chain the client will point to
async def connect() -> NoneEstablish a WebSocket connection to the API and start listening for messages
async def subscribe_authenticated(subscriptions: Sequence[
AuthTokenWebSocketRequestAuthenticatedSubscription],
markets: List[str] = None,
cid: str = None) -> NoneStrictly typed subscribe which only can be used on authenticated subscriptions.
See https://api-docs-v3.idex.io/`websocket`-subscriptions
Arguments:
subscriptions
markets- Optionally provide top level marketscid- Optional custom identifier to identify the matching response
async def subscribe_unauthenticated(
subscriptions: Sequence[WebSocketRequestUnauthenticatedSubscription],
markets: List[str] = None,
cid: str = None) -> NoneStrictly typed subscribe which only can be used on non-authenticated subscriptions.
See https://api-docs-v3.idex.io/`websocket`-subscriptions
Arguments:
subscriptions
markets- Optionally provide top level marketscid- Optional custom identifier to identify the matching response
async def subscribe(subscriptions: Sequence[
Union[WebSocketRequestSubscription,
WebSocketRequestUnauthenticatedSubscriptionNameOnly, ]],
markets: List[str] = None,
cid: str = None) -> NoneSubscribe to a given set of subscriptions, optionally providing a list of top level markets or a cid property.
See https://api-docs-v3.idex.io/`websocket`-subscriptions
Arguments:
subscriptions
markets- Optionally provide top level marketscid- Optional custom identifier to identify the matching response
async def reconnect() -> NoneReconnect with exponential backoff
class OrderBookRealTimeClient(AsyncIOEventEmitter)async def start(markets: List[str]) -> NoneLoads initial state from REST API and begin listening to orderbook updates.
async def stop() -> NoneStop the order book client, and reset internal state. Call this when you are no longer using the client, to release memory and network resources.
def set_fees_and_minimums_override(override: OrderBookFeesAndMinimums) -> NoneSet custom fee rates for synthetic price level calculations. Use this if your wallet has custom fees set.
def get_order_book_l1(market: str,
tick_size: Optional[int] = None
) -> RestResponseOrderBookLoad the current state of the level 1 orderbook for this market.
Arguments:
market
tick_size- minimum price movement expressed in pips (10^-8), defaults to market setting
def get_order_book_l2(
market: str,
limit: int = 100,
tick_size: Optional[int] = None) -> RestResponseOrderBookLoad the current state of the level 2 orderbook for this market.
Arguments:
market
limit- Total number of price levels (bids + asks) to return, between 2 and 1000tickSize- minimum price movement expressed in pips (10^-8)
def l1_equal(before_l1: L1OrderBook, after_l1: L1OrderBook) -> boolDetermine whether two level 1 order books are equal, including pool reserves
def update_l2_side(is_ascending: bool, side: List[OrderBookLevelL2],
updates: List[OrderBookLevelL2]) -> List[OrderBookLevelL2]Applies a changeset to a single side of the orderbook
Params: is_ascending: true for asks, false for bids (ordering of price levels) side updates
Returns:
Updated order book side
def update_l2_levels(book: L2OrderBook, updated_levels: L2OrderBook) -> NoneUpdates a level 2 orderbook using a partial "diff" received over websockets
Arguments:
book- level 2 orderbook to updateupdated_levels- level 2 orderbook containing only limit order price levels that have changed
class RestPublicClient()def ping() -> DictTest connectivity to the REST API See https://api-docs-v3.idex.io/`get`-ping
def get_server_time() -> intReturns the current server time See https://api-docs-v3.idex.io/`get`-time
def get_exchange_info() -> RestResponseExchangeInfoReturns basic information about the exchange See https://api-docs-v3.idex.io/`get`-exchange
def get_assets() -> List[RestResponseAsset]Returns information about assets supported by the exchange See https://api-docs-v3.idex.io/`get`-assets
def get_markets(
find_markets: Optional[RestRequestFindMarkets] = None
) -> List[RestResponseMarket]Returns information about the currently listed markets See https://api-docs-v3.idex.io/`get`-markets
def get_liquidity_pools(
find_liquidity_pools: Optional[RestRequestFindLiquidityPools] = None
) -> List[RestResponseLiquidityPool]Returns information about liquidity pools supported by the exchange See https://api-docs-v3.idex.io/`get`-liquidity-pools
def get_tickers(market: Optional[str] = None) -> List[RestResponseTicker]Returns market statistics for the trailing 24-hour period
def get_candles(
find_candles: RestRequestFindCandles) -> List[RestResponseCandle]Returns candle (OHLCV) data for a market See https://api-docs-v3.idex.io/`get`-candles
def get_trades(find_trades: RestRequestFindTrades) -> List[RestResponseTrade]Returns public trade data for a market See https://api-docs-v3.idex.io/`get`-trades
def get_order_book_level1(
market: str,
limit_order_only: bool = False) -> List[RestResponseOrderBook]Get current top bid/ask price levels of order book for a market See https://api-docs-v3.idex.io/`get`-order-books
def get_order_book_level2(
market: str,
limit: int = 50,
limit_order_only: bool = False) -> RestResponseOrderBookGet current order book price levels for a market See https://api-docs-v3.idex.io/`get`-order-books
class RestAuthenticatedClient()def add_liquidity(
req: request.RestRequestAddLiquidity,
signer: Optional[sig.MessageSigner] = None,
dependent_transactions: Optional[List[str]] = None
) -> response.RestResponseLiquidityAdditionAdd liquidity to a hybrid liquidity pool from assets held by a wallet on the exchange
def remove_liquidity(
req: request.RestRequestRemoveLiquidity,
signer: Optional[sig.MessageSigner] = None,
dependent_transactions: Optional[List[str]] = None
) -> response.RestResponseLiquidityRemovalRemove liquidity from a hybrid liquidity pool represented by LP tokens held by a wallet on the exchange
def get_liquidity_addition(
req: request.RestRequestFindLiquidityAddition
) -> Union[response.RestResponseLiquidityAddition,
List[response.RestResponseLiquidityAddition]]Returns information about a single liquidity addition from a wallet
def get_liquidity_additions(
req: request.RestRequestFindLiquidityChanges
) -> List[response.RestResponseLiquidityAddition]Returns information about multiple liquidity additions from a wallet
def get_liquidity_removal(
req: request.RestRequestFindLiquidityRemoval
) -> response.RestResponseLiquidityRemovalReturns information about a single liquidity removal from a wallet
def get_liquidity_removals(
req: request.RestRequestFindLiquidityChanges
) -> List[response.RestResponseLiquidityRemoval]Returns information about multiple liquidity removals from a wallet
def get_user(nonce: str) -> response.RestResponseUserGet account details for the API key's user See https://api-docs-v3.idex.io/`get`-user-account
Arguments:
nonce- UUIDv1
Returns:
Information about the user
def get_wallets(nonce: str) -> List[response.RestResponseWallet]Get account details for the API key's user See https://api-docs-v3.idex.io/`get`-wallets
Arguments:
nonce- UUIDv1
Returns:
The user's wallets
def get_balances(
req: request.RestRequestFindBalances
) -> List[response.RestResponseBalance]Get asset quantity data (positions) held by a wallet on the exchange
def associate_wallet(
req: request.RestRequestAssociateWallet,
signer: Optional[sig.MessageSigner] = None
) -> response.RestResponseAssociateWalletAssociate a wallet with the authenticated account See https://api-docs-v3.idex.io/`associate`-wallet
def create_order(
req: request.RestRequestOrder,
signer: Optional[sig.MessageSigner] = None
) -> response.RestResponseOrderCreate and submit an order to the matching engine See https://api-docs-v3.idex.io/`create`-order
def create_test_order(
req: request.RestRequestOrder,
signer: Optional[sig.MessageSigner] = None
) -> response.RestResponseOrderTests order creation and validation without submitting an order to the matching engine See https://api-docs-v3.idex.io/`test`-create-order
def cancel_order(
req: request.RestRequestCancelOrder,
signer: Optional[sig.MessageSigner] = None
) -> List[response.RestResponseCanceledOrder]Cancel a single order See https://api-docs-v3.idex.io/`cancel`-order
def cancel_orders(
req: request.RestRequestCancelOrder,
signer: Optional[sig.MessageSigner] = None
) -> List[response.RestResponseCanceledOrder]Cancel multiple orders See https://api-docs-v3.idex.io/`cancel`-order
def get_order(req: request.RestRequestFindOrder) -> response.RestResponseOrderGet an order See https://api-docs-v3.idex.io/`get`-orders
def get_orders(
req: request.RestRequestFindOrders
) -> List[response.RestResponseOrder]Get multiple orders See https://api-docs-v3.idex.io/`get`-orders
def get_fill(req: request.RestRequestFindFill) -> response.RestResponseFillGet a fill See https://api-docs-v3.idex.io/`get`-fills
def get_fills(
req: request.RestRequestFindFills) -> List[response.RestResponseFill]Get multiple fills See https://api-docs-v3.idex.io/`get`-fills
def get_deposit(
req: request.RestRequestFindDeposit) -> response.RestResponseDepositGet a fill See https://api-docs-v3.idex.io/`get`-deposits
def get_deposits(
req: request.RestRequestFindDeposits
) -> List[response.RestResponseDeposit]Get a fill See https://api-docs-v3.idex.io/`get`-deposits
def withdraw(
req: request.RestRequestWithdrawal,
signer: Optional[sig.MessageSigner] = None
) -> response.RestResponseWithdrawalCreate a new withdrawal See https://api-docs-v3.idex.io/[`withdraw`](#client.rest.authenticated.RestAuthenticatedClient.withdraw)-funds
def get_withdrawal(
req: request.RestRequestFindWithdrawal
) -> response.RestResponseWithdrawalGet a withdrawal See https://api-docs-v3.idex.io/`get`-withdrawals
def get_withdrawals(
req: request.RestRequestFindWithdrawals
) -> List[response.RestResponseWithdrawal]Get multiple withdrawals See https://api-docs-v3.idex.io/`get`-withdrawals
def get_ws_token(nonce: str, wallet: str) -> strGet multiple withdrawals See https://api-docs-v3.idex.io/`get`-withdrawals