CCXT (ccxt_client v0.6.1)

Copy Markdown View Source

Unified cryptocurrency exchange client library.

A CCXT client in Elixir scoped to the priority-tier universe (Tier 1 + Tier 2 + DEX). Exchange modules are generated from specs via macros — new exchange = new spec file, zero Elixir code. Tier 3 / unclassified exchanges are available on demand via mix ccxt_extract.update --exchange <id>.

Architecture

CCXT.fetch_ticker(exchange, "BTC/USDT")     # Unified API
     CCXT.Bybit (generated module)          # use CCXT.Exchange, spec: "bybit"
         CCXT.Dispatch.call/4               # Shared dispatcher
             CCXT.Signing.sign/4            # 9 patterns
             CCXT.HTTP.request/4            # Req wrapper

Quick Start

# List available exchanges
CCXT.Spec.exchanges()

# Create an exchange (public-only)
{:ok, bybit} = CCXT.exchange("bybit")

# Create with credentials
{:ok, bybit} = CCXT.exchange("bybit", api_key: "abc", secret: "xyz")

# TODO: Phase 5 parsers will return typed structs; currently returns raw HTTP response
{:ok, response} = CCXT.fetch_ticker(bybit, "BTC/USDT")

# Create an order (private, requires credentials)
{:ok, response} = CCXT.create_order(bybit, "BTC/USDT", "limit", "buy", 0.001, price: 50000)

Optional Parameters

All unified functions accept an opts keyword list as the last argument. Optional CCXT parameters (since, limit, price, symbol when optional, etc.) and exchange-specific parameters are passed via opts:

CCXT.fetch_trades(exchange, "BTC/USDT", since: 1_700_000_000_000, limit: 100)
CCXT.create_order(exchange, "BTC/USDT", "limit", "buy", 0.01, price: 50000)
CCXT.fetch_balance(exchange, type: "spot")

Dispatch-level options (:endpoint_index, :timeout, :plug, :headers, :base_url) are separated automatically and do not get passed to the exchange as parameters.

API Functions

FunctionArityDescriptionParam Kinds
create_gift_code4Create gift code.exchange: value, code: value, amount: value
create_vault4Create vault.exchange: value, code: value, amount: value
fetch_portfolio_details3Fetch portfolio details.exchange: value, portfolio_id: value
fetch_portfolios2Fetch portfolios.exchange: value
fetch_settlement_history2Fetch settlement history.exchange: value
fetch_convert_trade_history2Fetch convert trade history.exchange: value
fetch_convert_trade3Fetch convert trade.exchange: value, id: value
fetch_convert_quote5Fetch convert quote.exchange: value, from_code: value, to_code: value, amount: value
fetch_convert_currencies2Fetch convert currencies.exchange: value
create_convert_trade5Create convert trade.exchange: value, from_code: value, to_code: value, amount: value
fetch_isolated_borrow_rates2Fetch isolated borrow rates.exchange: value
fetch_isolated_borrow_rate3Fetch isolated borrow rate.exchange: value, symbol: value
fetch_cross_borrow_rates2Fetch cross borrow rates.exchange: value
fetch_cross_borrow_rate3Fetch cross borrow rate.exchange: value, code: value
fetch_borrow_rate_histories2Fetch borrow rate histories.exchange: value
fetch_borrow_rate_history3Fetch borrow rate history.exchange: value, code: value
fetch_borrow_interest2Fetch borrow interest.exchange: value
repay_margin4Repay margin.exchange: value, code: value, amount: value
repay_isolated_margin5Repay isolated margin.exchange: value, symbol: value, code: value, amount: value
repay_cross_margin4Repay cross margin.exchange: value, code: value, amount: value
borrow_isolated_margin5Borrow isolated margin.exchange: value, symbol: value, code: value, amount: value
borrow_cross_margin4Borrow cross margin.exchange: value, code: value, amount: value
transfer_uta6Transfer uta.exchange: value, code: value, amount: value, from_account: value, to_account: value
transfer_out5Transfer out.exchange: value, code: value, amount: value, address: value
transfer_classic6Transfer classic.exchange: value, code: value, amount: value, from_account: value, to_account: value
transfer_between_sub_accounts6Transfer between sub accounts.exchange: value, code: value, amount: value, from_account: value, to_account: value
transfer_between_main_and_sub_account6Transfer between main and sub account.exchange: value, code: value, amount: value, from_account: value, to_account: value
fetch_transfers2Fetch transfers.exchange: value
fetch_transfer3Fetch transfer.exchange: value, id: value
transfer6Transfer funds between exchange accounts (e.g., spot to futures).exchange: value, code: value, amount: value, from_account: value, to_account: value
fetch_transactions_by_type3Fetch transactions by type.exchange: value, type: value
fetch_transactions2Fetch transactions.exchange: value
fetch_deposits_withdrawals2Fetch deposits withdrawals.exchange: value
fetch_public_deposit_withdraw_fees2Fetch public deposit withdraw fees.exchange: value
fetch_private_deposit_withdraw_fees2Fetch private deposit withdraw fees.exchange: value
fetch_deposit_withdraw_fees2Fetch deposit withdraw fees.exchange: value
fetch_deposit_withdraw_fee3Fetch deposit withdraw fee.exchange: value, code: value
fetch_contract_deposits2Fetch contract deposits.exchange: value
fetch_contract_withdrawals2Fetch contract withdrawals.exchange: value
fetch_withdraw_addresses2Fetch withdraw addresses.exchange: value
fetch_withdrawals2Fetch withdrawal history.exchange: value
fetch_withdrawal3Fetch withdrawal.exchange: value, id: value
withdraw5Withdraw funds to an external address.exchange: value, code: value, amount: value, address: value
fetch_payment_methods2Fetch payment methods.exchange: value
fetch_deposit_methods3Fetch deposit methods.exchange: value, code: value
fetch_deposit_method_ids2Fetch deposit method ids.exchange: value
fetch_deposit_method_id3Fetch deposit method id.exchange: value, code: value
create_deposit_address3Create deposit address.exchange: value, code: value
fetch_contract_deposit_address3Fetch contract deposit address.exchange: value, code: value
fetch_network_deposit_address3Fetch network deposit address.exchange: value, code: value
fetch_deposit_addresses_by_network3Fetch deposit addresses by network.exchange: value, code: value
fetch_deposit_addresses2Fetch deposit addresses.exchange: value
fetch_deposit_address3Fetch a deposit address for a currency.exchange: value, code: value
fetch_deposits2Fetch deposit history.exchange: value
fetch_deposit3Fetch deposit.exchange: value, id: value
fetch_ledger_entries_by_ids3Fetch ledger entries by ids.exchange: value, ids: value
fetch_ledger_by_entries2Fetch ledger by entries.exchange: value
fetch_ledger_entry3Fetch ledger entry.exchange: value, id: value
fetch_ledger2Fetch the account ledger (transaction history).exchange: value
fetch_public_transaction_fees2Fetch public transaction fees.exchange: value
fetch_private_transaction_fees2Fetch private transaction fees.exchange: value
fetch_transaction_fees2Fetch transaction fees.exchange: value
fetch_transaction_fee3Fetch transaction fee.exchange: value, code: value
fetch_public_trading_fees2Fetch public trading fees.exchange: value
fetch_public_trading_fee3Fetch public trading fee.exchange: value, symbol: value
fetch_private_trading_fees2Fetch private trading fees.exchange: value
fetch_private_trading_fee3Fetch private trading fee.exchange: value, symbol: value
fetch_trading_limits_by_id3Fetch trading limits by id.exchange: value, id: value
fetch_trading_limits2Fetch trading limits.exchange: value
fetch_trading_fees2Fetch trading fees for all symbols.exchange: value
fetch_trading_fee3Fetch the trading fee for a specific symbol.exchange: value, symbol: value
fetch_margin_adjustment_history2Fetch margin adjustment history.exchange: value
reduce_margin4Reduce margin.exchange: value, amount: value, symbol: value
add_margin4Add margin.exchange: value, amount: value, symbol: value
set_margin4Set margin.exchange: value, amount: value, symbol: value
set_margin_mode4Set margin mode (cross/isolated) for a symbol.exchange: value, margin_mode: value, symbol: value
fetch_margin_modes2Fetch margin modes.exchange: value
fetch_margin_mode3Fetch margin mode.exchange: value, symbol: value
set_leverage4Set leverage for a symbol on the exchange.exchange: value, leverage: value, symbol: value
fetch_leverage_tiers2Fetch leverage tiers.exchange: value
fetch_leverages2Fetch leverages.exchange: value
fetch_leverage3Fetch current leverage setting for a symbol.exchange: value, symbol: value
set_position_mode3Set position mode.exchange: value, hedge_mode: value
fetch_position_mode2Fetch position mode.exchange: value
close_all_positions2Close all positions.exchange: value
close_position3Close a derivative position for a symbol.exchange: value, symbol: value
fetch_positions_adl_rank2Fetch positions adl rank.exchange: value
fetch_positions_risk2Fetch positions risk.exchange: value
fetch_position_history2Fetch position history.exchange: value
fetch_positions_history2Fetch positions history.exchange: value
fetch_positions_for_symbol3Fetch positions for symbol.exchange: value, symbol: value
fetch_positions2Fetch all open derivative positions.exchange: value
fetch_position3Fetch a specific derivative position for a symbol.exchange: value, symbol: value
fetch_my_settlement_history2Fetch my settlement history.exchange: value
fetch_my_liquidations2Fetch my liquidations.exchange: value
fetch_my_dust_trades2Fetch my dust trades.exchange: value
fetch_my_sells2Fetch my sells.exchange: value
fetch_my_buys2Fetch my buys.exchange: value
fetch_my_uta_trades2Fetch my uta trades.exchange: value
fetch_my_contract_trades2Fetch my contract trades.exchange: value
fetch_my_spot_trades2Fetch my spot trades.exchange: value
fetch_my_trades2Fetch the authenticated user's trade history.exchange: value
create_sub_account2Create sub account.exchange: value
create_account2Create account.exchange: value
fetch_account_positions2Fetch account positions.exchange: value
fetch_accounts2Fetch accounts.exchange: value
fetch_account2Fetch account.exchange: value
fetch_uta_balance2Fetch uta balance.exchange: value
fetch_financial_balance2Fetch financial balance.exchange: value
fetch_margin_balance2Fetch margin balance.exchange: value
fetch_contract_balance2Fetch contract balance.exchange: value
fetch_spot_balance2Fetch spot balance.exchange: value
fetch_balance2Fetch account balance across all currencies.exchange: value
fetch_adl_rank2Fetch adl rank.exchange: value
fetch_uta_canceled_and_closed_orders2Fetch uta canceled and closed orders.exchange: value
fetch_uta_orders_by_status2Fetch uta orders by status.exchange: value
fetch_uta_order3Fetch uta order.exchange: value, id: value
fetch_contract_orders_by_status2Fetch contract orders by status.exchange: value
fetch_contract_orders2Fetch contract orders.exchange: value
fetch_contract_order3Fetch contract order.exchange: value, id: value
fetch_canceled_and_closed_swap_orders2Fetch canceled and closed swap orders.exchange: value
fetch_canceled_and_closed_spot_orders2Fetch canceled and closed spot orders.exchange: value
fetch_closed_contract_orders2Fetch closed contract orders.exchange: value
fetch_closed_spot_orders2Fetch closed spot orders.exchange: value
fetch_open_swap_orders2Fetch open swap orders.exchange: value
fetch_open_spot_orders2Fetch open spot orders.exchange: value
fetch_spot_orders_by_status2Fetch spot orders by status.exchange: value
fetch_spot_orders_by_states2Fetch spot orders by states.exchange: value
fetch_spot_order_trades3Fetch spot order trades.exchange: value, id: value
fetch_spot_orders2Fetch spot orders.exchange: value
fetch_spot_order3Fetch spot order.exchange: value, id: value
fetch_orders_by_type3Fetch orders by type.exchange: value, type: value
fetch_orders_by_status3Fetch orders by status.exchange: value, status: value
fetch_orders_by_state3Fetch orders by state.exchange: value, state: value
fetch_orders_by_ids3Fetch orders by ids.exchange: value, ids: value
fetch_order_status3Fetch order status.exchange: value, id: value
fetch_order_trades3Fetch order trades.exchange: value, id: value
fetch_canceled_and_closed_orders2Fetch canceled and closed orders.exchange: value
fetch_canceled_orders2Fetch canceled orders.exchange: value
fetch_closed_orders2Fetch completed (filled) orders.exchange: value
fetch_closed_order3Fetch closed order.exchange: value, id: value
fetch_open_orders2Fetch all currently open orders.exchange: value
fetch_open_order3Fetch open order.exchange: value, id: value
fetch_orders_classic2Fetch orders classic.exchange: value
fetch_orders2Fetch a list of orders, optionally filtered by symbol.exchange: value
fetch_order_classic3Fetch order classic.exchange: value, id: value
fetch_order3Fetch details of a specific order by ID.exchange: value, id: value
edit_spot_order6Edit spot order.exchange: value, id: value, symbol: value, type: value, side: value
edit_contract_order6Edit contract order.exchange: value, id: value, symbol: value, type: value, side: value
edit_orders3Edit orders.exchange: value, orders: value
edit_order6Edit an existing order (modify price, amount, etc.).exchange: value, id: value, symbol: value, type: value, side: value
cancel_all_uta_orders2Cancel all uta orders.exchange: value
cancel_all_contract_orders2Cancel all contract orders.exchange: value
cancel_all_spot_orders2Cancel all spot orders.exchange: value
cancel_twap_order3Cancel twap order.exchange: value, id: value
cancel_uta_orders3Cancel uta orders.exchange: value, ids: value
cancel_uta_order3Cancel uta order.exchange: value, id: value
cancel_unified_order3Cancel unified order.exchange: value, id: value
cancel_contract_order3Cancel contract order.exchange: value, id: value
cancel_spot_order3Cancel spot order.exchange: value, id: value
cancel_orders_for_symbols3Cancel orders for symbols.exchange: value, orders: value
cancel_all_orders_after3Cancel all orders after.exchange: value, timeout: value
cancel_all_orders2Cancel all open orders, optionally filtered by symbol.exchange: value
cancel_orders3Cancel orders.exchange: value, ids: value
cancel_order3Cancel an existing order by ID.exchange: value, id: value
create_market_order_with_cost5Create market order with cost.exchange: value, symbol: value, side: value, cost: value
create_market_sell_order_with_cost4Create market sell order with cost.exchange: value, symbol: value, cost: value
create_market_buy_order_with_cost4Create market buy order with cost.exchange: value, symbol: value, cost: value
create_twap_order6Create twap order.exchange: value, symbol: value, type: value, side: value, amount: value
create_trailing_percent_order6Create trailing percent order.exchange: value, symbol: value, type: value, side: value, amount: value
create_trailing_amount_order6Create trailing amount order.exchange: value, symbol: value, type: value, side: value, amount: value
create_order_with_take_profit_and_stop_loss6Create order with take profit and stop loss.exchange: value, symbol: value, type: value, side: value, amount: value
create_uta_orders3Create uta orders.exchange: value, orders: value
create_uta_order6Create uta order.exchange: value, symbol: value, type: value, side: value, amount: value
create_swap_order6Create swap order.exchange: value, symbol: value, type: value, side: value, amount: value
create_contract_orders3Create contract orders.exchange: value, orders: value
create_contract_order6Create contract order.exchange: value, symbol: value, type: value, side: value, amount: value
create_spot_orders3Create spot orders.exchange: value, orders: value
create_spot_order6Create spot order.exchange: value, symbol: value, type: value, side: value, amount: value
create_orders3Create multiple orders in a single request.exchange: value, orders: value
create_order6Create a new order on the exchange.exchange: value, symbol: value, type: value, side: value, amount: value
fetch_contract_tickers2Fetch contract tickers.exchange: value
fetch_uta_ohlcv4Fetch uta ohlcv.exchange: value, symbol: value, timeframe: value
fetch_spot_ohlcv4Fetch spot ohlcv.exchange: value, symbol: value, timeframe: value
fetch_contract_ohlcv4Fetch contract ohlcv.exchange: value, symbol: value, timeframe: value
fetch_option_ohlcv4Fetch option ohlcv.exchange: value, symbol: value, timeframe: value
fetch_option_positions2Fetch option positions.exchange: value
fetch_option_underlyings2Fetch option underlyings.exchange: value
fetch_underlying_assets2Fetch underlying assets.exchange: value
fetch_all_greeks2Fetch all greeks.exchange: value
fetch_greeks3Fetch option greeks (delta, gamma, theta, vega) for a symbol.exchange: value, symbol: value
fetch_option_chain3Fetch the full options chain for an underlying asset.exchange: value, symbol: value
fetch_option3Fetch option.exchange: value, symbol: value
fetch_volatility_history3Fetch volatility history.exchange: value, symbol: value
fetch_liquidations3Fetch recent liquidation events for a symbol.exchange: value, symbol: value
fetch_long_short_ratio_history3Fetch long short ratio history.exchange: value, symbol: value
fetch_derivatives_open_interest_history3Fetch derivatives open interest history.exchange: value, symbol: value
fetch_open_interests2Fetch open interests.exchange: value
fetch_open_interest_history3Fetch open interest history.exchange: value, symbol: value
fetch_open_interest3Fetch open interest for a perpetual or futures symbol.exchange: value, symbol: value
fetch_funding_limits2Fetch funding limits.exchange: value
fetch_funding_intervals2Fetch funding intervals.exchange: value
fetch_funding_interval3Fetch funding interval.exchange: value, symbol: value
fetch_funding_history3Fetch funding history.exchange: value, symbol: value
fetch_funding_rate_history3Fetch funding rate history.exchange: value, symbol: value
fetch_funding_rates2Fetch funding rates for all perpetual swaps.exchange: value
fetch_funding_rate3Fetch the current funding rate for a perpetual swap.exchange: value, symbol: value
fetch_derivatives_market_leverage_tiers3Fetch derivatives market leverage tiers.exchange: value, symbol: value
fetch_market_leverage_tiers3Fetch market leverage tiers.exchange: value, symbol: value
fetch_mark_prices2Fetch mark prices.exchange: value
fetch_mark_price3Fetch the mark price for a derivative symbol.exchange: value, symbol: value
fetch_market_by_id3Fetch market by id.exchange: value, id: value
fetch_market3Fetch market.exchange: value, symbol: value
fetch_last_prices2Fetch last prices.exchange: value
fetch_bids_asks2Fetch bids asks.exchange: value
fetch_status2Fetch the exchange operational status.exchange: value
fetch_time2Fetch the exchange server time.exchange: value
fetch_currency_by_id3Fetch currency by id.exchange: value, id: value
fetch_currency3Fetch currency.exchange: value, code: value
fetch_currencies2Fetch all available currencies and their details.exchange: value
fetch_usdt_markets2Fetch usdt markets.exchange: value
fetch_swap_balance2Fetch swap balance.exchange: value
fetch_uta_markets2Fetch uta markets.exchange: value
fetch_inverse_swap_markets2Fetch inverse swap markets.exchange: value
fetch_swap_and_future_markets2Fetch swap and future markets.exchange: value
fetch_contract_markets2Fetch contract markets.exchange: value
fetch_option_markets2Fetch option markets.exchange: value
fetch_future_markets2Fetch future markets.exchange: value
fetch_swap_markets2Fetch swap markets.exchange: value
fetch_spot_markets2Fetch spot markets.exchange: value
fetch_markets_by_type_and_sub_type4Fetch markets by type and sub type.exchange: value, type: value, sub_type: value
fetch_markets_by_type3Fetch markets by type.exchange: value, type: value
fetch_markets2Fetch all available markets and trading pairs.exchange: value
fetch_ohlcv4Fetch OHLCV candlestick data for a symbol and timeframe.exchange: value, symbol: value, timeframe: value
fetch_trades3Fetch recent public trades for a symbol.exchange: value, symbol: value
fetch_l3_order_book3Fetch l3 order book.exchange: value, symbol: value
fetch_l2_order_book3Fetch l2 order book.exchange: value, symbol: value
fetch_order_books2Fetch order books.exchange: value
fetch_order_book3Fetch the order book (bids and asks) for a symbol.exchange: value, symbol: value
fetch_tickers2Fetch tickers for all or specified trading pairs.exchange: value
fetch_ticker3Fetch latest ticker (price, volume, bid/ask) for a trading pair.exchange: value, symbol: value
exchange2Create an exchange configuration.exchange_id: value

Summary

Functions

Return the list of modules registered with this library.

Cancel all open orders, optionally filtered by symbol.

Cancel an existing order by ID.

Close a derivative position for a symbol.

Create multiple orders in a single request.

Return a Level 1 overview of all modules in this library.

Return Level 2 function list for a module (by full atom or short name).

Return Level 3 function detail (or nil if not found).

Edit an existing order (modify price, amount, etc.).

Create an exchange configuration.

Bang variant of exchange/2. Raises on error.

Fetch account balance across all currencies.

Fetch canceled and closed orders.

Fetch canceled and closed spot orders.

Fetch canceled and closed swap orders.

Fetch completed (filled) orders.

Fetch all available currencies and their details.

Fetch a deposit address for a currency.

Fetch deposit history.

Fetch the current funding rate for a perpetual swap.

Fetch funding rates for all perpetual swaps.

Fetch option greeks (delta, gamma, theta, vega) for a symbol.

Fetch the account ledger (transaction history).

Fetch current leverage setting for a symbol.

Fetch recent liquidation events for a symbol.

Fetch the mark price for a derivative symbol.

Fetch all available markets and trading pairs.

Fetch the authenticated user's trade history.

Fetch OHLCV candlestick data for a symbol and timeframe.

Fetch open interest for a perpetual or futures symbol.

Fetch all currently open orders.

Fetch the full options chain for an underlying asset.

Fetch details of a specific order by ID.

Fetch the order book (bids and asks) for a symbol.

Fetch a list of orders, optionally filtered by symbol.

Fetch a specific derivative position for a symbol.

Fetch all open derivative positions.

Fetch private deposit withdraw fees.

Fetch public deposit withdraw fees.

Fetch the exchange operational status.

Fetch latest ticker (price, volume, bid/ask) for a trading pair.

Fetch tickers for all or specified trading pairs.

Fetch the exchange server time.

Fetch recent public trades for a symbol.

Fetch the trading fee for a specific symbol.

Fetch trading fees for all symbols.

Fetch uta canceled and closed orders.

Fetch withdrawal history.

Set leverage for a symbol on the exchange.

Set margin mode (cross/isolated) for a symbol.

Transfer funds between exchange accounts (e.g., spot to futures).

Withdraw funds to an external address.

Functions

__descripex_modules__()

@spec __descripex_modules__() :: [module()]

Return the list of modules registered with this library.

add_margin(exchange, amount, symbol, opts \\ [])

Add margin.

Parameters

  • exchange - Exchange configuration struct (value)
  • amount - amount (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

borrow_cross_margin(exchange, code, amount, opts \\ [])

Borrow cross margin.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

borrow_isolated_margin(exchange, symbol, code, amount, opts \\ [])

Borrow isolated margin.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • code - code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_all_contract_orders(exchange, opts \\ [])

Cancel all contract orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_all_orders(exchange, opts \\ [])

Cancel all open orders, optionally filtered by symbol.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_all_orders_after(exchange, timeout, opts \\ [])

Cancel all orders after.

Parameters

  • exchange - Exchange configuration struct (value)
  • timeout - timeout (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    timeout: %{description: "timeout", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_all_spot_orders(exchange, opts \\ [])

Cancel all spot orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_all_uta_orders(exchange, opts \\ [])

Cancel all uta orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_contract_order(exchange, id, opts \\ [])

Cancel contract order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_order(exchange, id, opts \\ [])

Cancel an existing order by ID.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_orders(exchange, ids, opts \\ [])

Cancel orders.

Parameters

  • exchange - Exchange configuration struct (value)
  • ids - ids (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    ids: %{description: "ids", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_orders_for_symbols(exchange, orders, opts \\ [])

Cancel orders for symbols.

Parameters

  • exchange - Exchange configuration struct (value)
  • orders - orders (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    orders: %{description: "orders", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_spot_order(exchange, id, opts \\ [])

Cancel spot order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_twap_order(exchange, id, opts \\ [])

Cancel twap order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_unified_order(exchange, id, opts \\ [])

Cancel unified order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_uta_order(exchange, id, opts \\ [])

Cancel uta order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

cancel_uta_orders(exchange, ids, opts \\ [])

Cancel uta orders.

Parameters

  • exchange - Exchange configuration struct (value)
  • ids - ids (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    ids: %{description: "ids", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

close_all_positions(exchange, opts \\ [])

Close all positions.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

close_position(exchange, symbol, opts \\ [])

Close a derivative position for a symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_account(exchange, opts \\ [])

Create account.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_contract_order(exchange, symbol, type, side, amount, opts \\ [])

Create contract order.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_contract_orders(exchange, orders, opts \\ [])

Create contract orders.

Parameters

  • exchange - Exchange configuration struct (value)
  • orders - orders (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    orders: %{description: "orders", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_convert_trade(exchange, from_code, to_code, amount, opts \\ [])

Create convert trade.

Parameters

  • exchange - Exchange configuration struct (value)
  • from_code - from code (value)
  • to_code - to code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value},
    from_code: %{description: "from code", kind: :value},
    to_code: %{description: "to code", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_deposit_address(exchange, code, opts \\ [])

Create deposit address.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_gift_code(exchange, code, amount, opts \\ [])

Create gift code.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_market_buy_order_with_cost(exchange, symbol, cost, opts \\ [])

Create market buy order with cost.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • cost - cost (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    cost: %{description: "cost", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_market_order_with_cost(exchange, symbol, side, cost, opts \\ [])

Create market order with cost.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • side - side (value)
  • cost - cost (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    cost: %{description: "cost", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_market_sell_order_with_cost(exchange, symbol, cost, opts \\ [])

Create market sell order with cost.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • cost - cost (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    cost: %{description: "cost", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_order(exchange, symbol, type, side, amount, opts \\ [])

Create a new order on the exchange.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_order_with_take_profit_and_stop_loss(exchange, symbol, type, side, amount, opts \\ [])

Create order with take profit and stop loss.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_orders(exchange, orders, opts \\ [])

Create multiple orders in a single request.

Parameters

  • exchange - Exchange configuration struct (value)
  • orders - orders (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    orders: %{description: "orders", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_spot_order(exchange, symbol, type, side, amount, opts \\ [])

Create spot order.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_spot_orders(exchange, orders, opts \\ [])

Create spot orders.

Parameters

  • exchange - Exchange configuration struct (value)
  • orders - orders (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    orders: %{description: "orders", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_sub_account(exchange, opts \\ [])

Create sub account.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_swap_order(exchange, symbol, type, side, amount, opts \\ [])

Create swap order.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_trailing_amount_order(exchange, symbol, type, side, amount, opts \\ [])

Create trailing amount order.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_trailing_percent_order(exchange, symbol, type, side, amount, opts \\ [])

Create trailing percent order.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_twap_order(exchange, symbol, type, side, amount, opts \\ [])

Create twap order.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_uta_order(exchange, symbol, type, side, amount, opts \\ [])

Create uta order.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_uta_orders(exchange, orders, opts \\ [])

Create uta orders.

Parameters

  • exchange - Exchange configuration struct (value)
  • orders - orders (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    orders: %{description: "orders", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

create_vault(exchange, code, amount, opts \\ [])

Create vault.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

describe()

@spec describe() :: [map()]

Return a Level 1 overview of all modules in this library.

describe(mod_or_short)

@spec describe(module() | atom()) :: [map()]

Return Level 2 function list for a module (by full atom or short name).

describe(mod_or_short, func_name)

@spec describe(module() | atom(), atom()) :: map() | nil

Return Level 3 function detail (or nil if not found).

edit_contract_order(exchange, id, symbol, type, side, opts \\ [])

Edit contract order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

edit_order(exchange, id, symbol, type, side, opts \\ [])

Edit an existing order (modify price, amount, etc.).

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

edit_orders(exchange, orders, opts \\ [])

Edit orders.

Parameters

  • exchange - Exchange configuration struct (value)
  • orders - orders (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    orders: %{description: "orders", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

edit_spot_order(exchange, id, symbol, type, side, opts \\ [])

Edit spot order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)
  • symbol - symbol (value)
  • type - type (value)
  • side - side (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    side: %{description: "side", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

exchange(exchange_id, opts \\ [])

@spec exchange(
  String.t() | atom(),
  keyword()
) :: {:ok, CCXT.Exchange.t()} | {:error, term()}

Create an exchange configuration.

Parameters

  • exchange_id - Exchange identifier (e.g., "bybit", :binance) (value)

Options

  • api_key - API key for authenticated endpoints
  • secret - API secret
  • password - API password/passphrase (exchange-specific)
  • sandbox - Use testnet URLs (default: false)

Returns

{:ok, %CCXT.Exchange{} with :tier populated from spec ("tier1"/"tier2"/"dex"/"tier3"/"unclassified"/nil)} or {:error, reason} (result_tuple)

Errors

  • :invalid_exchange
  • :missing_credentials
# descripex:contract
%{
  opts: %{
    password: %{
      description: "API password/passphrase (exchange-specific)",
      kind: :value
    },
    api_key: %{description: "API key for authenticated endpoints", kind: :value},
    secret: %{description: "API secret", kind: :value},
    sandbox: %{default: false, description: "Use testnet URLs", kind: :value}
  },
  params: %{
    exchange_id: %{
      description: "Exchange identifier (e.g., \"bybit\", :binance)",
      kind: :value
    }
  },
  errors: [:invalid_exchange, :missing_credentials],
  returns: %{
    type: :result_tuple,
    description: "{:ok, %CCXT.Exchange{} with :tier populated from spec (\"tier1\"/\"tier2\"/\"dex\"/\"tier3\"/\"unclassified\"/nil)} or {:error, reason}"
  }
}

exchange!(exchange_id, opts \\ [])

@spec exchange!(
  String.t() | atom(),
  keyword()
) :: CCXT.Exchange.t()

Bang variant of exchange/2. Raises on error.

fetch_account(exchange, opts \\ [])

Fetch account.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_account_positions(exchange, opts \\ [])

Fetch account positions.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_accounts(exchange, opts \\ [])

Fetch accounts.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_adl_rank(exchange, opts \\ [])

Fetch adl rank.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_all_greeks(exchange, opts \\ [])

Fetch all greeks.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_balance(exchange, opts \\ [])

Fetch account balance across all currencies.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_bids_asks(exchange, opts \\ [])

Fetch bids asks.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_borrow_interest(exchange, opts \\ [])

Fetch borrow interest.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_borrow_rate_histories(exchange, opts \\ [])

Fetch borrow rate histories.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_borrow_rate_history(exchange, code, opts \\ [])

Fetch borrow rate history.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_canceled_and_closed_orders(exchange, opts \\ [])

Fetch canceled and closed orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_canceled_and_closed_spot_orders(exchange, opts \\ [])

Fetch canceled and closed spot orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_canceled_and_closed_swap_orders(exchange, opts \\ [])

Fetch canceled and closed swap orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_canceled_orders(exchange, opts \\ [])

Fetch canceled orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_closed_contract_orders(exchange, opts \\ [])

Fetch closed contract orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_closed_order(exchange, id, opts \\ [])

Fetch closed order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_closed_orders(exchange, opts \\ [])

Fetch completed (filled) orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_closed_spot_orders(exchange, opts \\ [])

Fetch closed spot orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_balance(exchange, opts \\ [])

Fetch contract balance.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_deposit_address(exchange, code, opts \\ [])

Fetch contract deposit address.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_deposits(exchange, opts \\ [])

Fetch contract deposits.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_markets(exchange, opts \\ [])

Fetch contract markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_ohlcv(exchange, symbol, timeframe, opts \\ [])

Fetch contract ohlcv.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • timeframe - timeframe (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    timeframe: %{description: "timeframe", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_order(exchange, id, opts \\ [])

Fetch contract order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_orders(exchange, opts \\ [])

Fetch contract orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_orders_by_status(exchange, opts \\ [])

Fetch contract orders by status.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_tickers(exchange, opts \\ [])

Fetch contract tickers.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_contract_withdrawals(exchange, opts \\ [])

Fetch contract withdrawals.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_convert_currencies(exchange, opts \\ [])

Fetch convert currencies.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_convert_quote(exchange, from_code, to_code, amount, opts \\ [])

Fetch convert quote.

Parameters

  • exchange - Exchange configuration struct (value)
  • from_code - from code (value)
  • to_code - to code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value},
    from_code: %{description: "from code", kind: :value},
    to_code: %{description: "to code", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_convert_trade(exchange, id, opts \\ [])

Fetch convert trade.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_convert_trade_history(exchange, opts \\ [])

Fetch convert trade history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_cross_borrow_rate(exchange, code, opts \\ [])

Fetch cross borrow rate.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_cross_borrow_rates(exchange, opts \\ [])

Fetch cross borrow rates.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_currencies(exchange, opts \\ [])

Fetch all available currencies and their details.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_currency(exchange, code, opts \\ [])

Fetch currency.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_currency_by_id(exchange, id, opts \\ [])

Fetch currency by id.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit(exchange, id, opts \\ [])

Fetch deposit.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit_address(exchange, code, opts \\ [])

Fetch a deposit address for a currency.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit_addresses(exchange, opts \\ [])

Fetch deposit addresses.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit_addresses_by_network(exchange, code, opts \\ [])

Fetch deposit addresses by network.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit_method_id(exchange, code, opts \\ [])

Fetch deposit method id.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit_method_ids(exchange, opts \\ [])

Fetch deposit method ids.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit_methods(exchange, code, opts \\ [])

Fetch deposit methods.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit_withdraw_fee(exchange, code, opts \\ [])

Fetch deposit withdraw fee.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposit_withdraw_fees(exchange, opts \\ [])

Fetch deposit withdraw fees.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposits(exchange, opts \\ [])

Fetch deposit history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_deposits_withdrawals(exchange, opts \\ [])

Fetch deposits withdrawals.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_derivatives_market_leverage_tiers(exchange, symbol, opts \\ [])

Fetch derivatives market leverage tiers.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_derivatives_open_interest_history(exchange, symbol, opts \\ [])

Fetch derivatives open interest history.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_financial_balance(exchange, opts \\ [])

Fetch financial balance.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_funding_history(exchange, symbol, opts \\ [])

Fetch funding history.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_funding_interval(exchange, symbol, opts \\ [])

Fetch funding interval.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_funding_intervals(exchange, opts \\ [])

Fetch funding intervals.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_funding_limits(exchange, opts \\ [])

Fetch funding limits.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_funding_rate(exchange, symbol, opts \\ [])

Fetch the current funding rate for a perpetual swap.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_funding_rate_history(exchange, symbol, opts \\ [])

Fetch funding rate history.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_funding_rates(exchange, opts \\ [])

Fetch funding rates for all perpetual swaps.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_future_markets(exchange, opts \\ [])

Fetch future markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_greeks(exchange, symbol, opts \\ [])

Fetch option greeks (delta, gamma, theta, vega) for a symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_inverse_swap_markets(exchange, opts \\ [])

Fetch inverse swap markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_isolated_borrow_rate(exchange, symbol, opts \\ [])

Fetch isolated borrow rate.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_isolated_borrow_rates(exchange, opts \\ [])

Fetch isolated borrow rates.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_l2_order_book(exchange, symbol, opts \\ [])

Fetch l2 order book.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_l3_order_book(exchange, symbol, opts \\ [])

Fetch l3 order book.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_last_prices(exchange, opts \\ [])

Fetch last prices.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_ledger(exchange, opts \\ [])

Fetch the account ledger (transaction history).

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_ledger_by_entries(exchange, opts \\ [])

Fetch ledger by entries.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_ledger_entries_by_ids(exchange, ids, opts \\ [])

Fetch ledger entries by ids.

Parameters

  • exchange - Exchange configuration struct (value)
  • ids - ids (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    ids: %{description: "ids", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_ledger_entry(exchange, id, opts \\ [])

Fetch ledger entry.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_leverage(exchange, symbol, opts \\ [])

Fetch current leverage setting for a symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_leverage_tiers(exchange, opts \\ [])

Fetch leverage tiers.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_leverages(exchange, opts \\ [])

Fetch leverages.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_liquidations(exchange, symbol, opts \\ [])

Fetch recent liquidation events for a symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_long_short_ratio_history(exchange, symbol, opts \\ [])

Fetch long short ratio history.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_margin_adjustment_history(exchange, opts \\ [])

Fetch margin adjustment history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_margin_balance(exchange, opts \\ [])

Fetch margin balance.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_margin_mode(exchange, symbol, opts \\ [])

Fetch margin mode.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_margin_modes(exchange, opts \\ [])

Fetch margin modes.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_mark_price(exchange, symbol, opts \\ [])

Fetch the mark price for a derivative symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_mark_prices(exchange, opts \\ [])

Fetch mark prices.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_market(exchange, symbol, opts \\ [])

Fetch market.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_market_by_id(exchange, id, opts \\ [])

Fetch market by id.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_market_leverage_tiers(exchange, symbol, opts \\ [])

Fetch market leverage tiers.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_markets(exchange, opts \\ [])

Fetch all available markets and trading pairs.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_markets_by_type(exchange, type, opts \\ [])

Fetch markets by type.

Parameters

  • exchange - Exchange configuration struct (value)
  • type - type (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_markets_by_type_and_sub_type(exchange, type, sub_type, opts \\ [])

Fetch markets by type and sub type.

Parameters

  • exchange - Exchange configuration struct (value)
  • type - type (value)
  • sub_type - sub type (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    sub_type: %{description: "sub type", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_buys(exchange, opts \\ [])

Fetch my buys.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_contract_trades(exchange, opts \\ [])

Fetch my contract trades.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_dust_trades(exchange, opts \\ [])

Fetch my dust trades.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_liquidations(exchange, opts \\ [])

Fetch my liquidations.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_sells(exchange, opts \\ [])

Fetch my sells.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_settlement_history(exchange, opts \\ [])

Fetch my settlement history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_spot_trades(exchange, opts \\ [])

Fetch my spot trades.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_trades(exchange, opts \\ [])

Fetch the authenticated user's trade history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_my_uta_trades(exchange, opts \\ [])

Fetch my uta trades.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_network_deposit_address(exchange, code, opts \\ [])

Fetch network deposit address.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_ohlcv(exchange, symbol, timeframe, opts \\ [])

Fetch OHLCV candlestick data for a symbol and timeframe.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • timeframe - timeframe (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    timeframe: %{description: "timeframe", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_open_interest(exchange, symbol, opts \\ [])

Fetch open interest for a perpetual or futures symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_open_interest_history(exchange, symbol, opts \\ [])

Fetch open interest history.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_open_interests(exchange, opts \\ [])

Fetch open interests.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_open_order(exchange, id, opts \\ [])

Fetch open order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_open_orders(exchange, opts \\ [])

Fetch all currently open orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_open_spot_orders(exchange, opts \\ [])

Fetch open spot orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_open_swap_orders(exchange, opts \\ [])

Fetch open swap orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_option(exchange, symbol, opts \\ [])

Fetch option.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_option_chain(exchange, symbol, opts \\ [])

Fetch the full options chain for an underlying asset.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_option_markets(exchange, opts \\ [])

Fetch option markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_option_ohlcv(exchange, symbol, timeframe, opts \\ [])

Fetch option ohlcv.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • timeframe - timeframe (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    timeframe: %{description: "timeframe", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_option_positions(exchange, opts \\ [])

Fetch option positions.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_option_underlyings(exchange, opts \\ [])

Fetch option underlyings.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_order(exchange, id, opts \\ [])

Fetch details of a specific order by ID.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_order_book(exchange, symbol, opts \\ [])

Fetch the order book (bids and asks) for a symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_order_books(exchange, opts \\ [])

Fetch order books.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_order_classic(exchange, id, opts \\ [])

Fetch order classic.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_order_status(exchange, id, opts \\ [])

Fetch order status.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_order_trades(exchange, id, opts \\ [])

Fetch order trades.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_orders(exchange, opts \\ [])

Fetch a list of orders, optionally filtered by symbol.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_orders_by_ids(exchange, ids, opts \\ [])

Fetch orders by ids.

Parameters

  • exchange - Exchange configuration struct (value)
  • ids - ids (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    ids: %{description: "ids", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_orders_by_state(exchange, state, opts \\ [])

Fetch orders by state.

Parameters

  • exchange - Exchange configuration struct (value)
  • state - state (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    state: %{description: "state", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_orders_by_status(exchange, status, opts \\ [])

Fetch orders by status.

Parameters

  • exchange - Exchange configuration struct (value)
  • status - status (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    status: %{description: "status", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_orders_by_type(exchange, type, opts \\ [])

Fetch orders by type.

Parameters

  • exchange - Exchange configuration struct (value)
  • type - type (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_orders_classic(exchange, opts \\ [])

Fetch orders classic.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_payment_methods(exchange, opts \\ [])

Fetch payment methods.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_portfolio_details(exchange, portfolio_id, opts \\ [])

Fetch portfolio details.

Parameters

  • exchange - Exchange configuration struct (value)
  • portfolio_id - portfolio id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    portfolio_id: %{description: "portfolio id", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_portfolios(exchange, opts \\ [])

Fetch portfolios.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_position(exchange, symbol, opts \\ [])

Fetch a specific derivative position for a symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_position_history(exchange, opts \\ [])

Fetch position history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_position_mode(exchange, opts \\ [])

Fetch position mode.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_positions(exchange, opts \\ [])

Fetch all open derivative positions.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_positions_adl_rank(exchange, opts \\ [])

Fetch positions adl rank.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_positions_for_symbol(exchange, symbol, opts \\ [])

Fetch positions for symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_positions_history(exchange, opts \\ [])

Fetch positions history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_positions_risk(exchange, opts \\ [])

Fetch positions risk.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_private_deposit_withdraw_fees(exchange, opts \\ [])

Fetch private deposit withdraw fees.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_private_trading_fee(exchange, symbol, opts \\ [])

Fetch private trading fee.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_private_trading_fees(exchange, opts \\ [])

Fetch private trading fees.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_private_transaction_fees(exchange, opts \\ [])

Fetch private transaction fees.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_public_deposit_withdraw_fees(exchange, opts \\ [])

Fetch public deposit withdraw fees.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_public_trading_fee(exchange, symbol, opts \\ [])

Fetch public trading fee.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_public_trading_fees(exchange, opts \\ [])

Fetch public trading fees.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_public_transaction_fees(exchange, opts \\ [])

Fetch public transaction fees.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_settlement_history(exchange, opts \\ [])

Fetch settlement history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_spot_balance(exchange, opts \\ [])

Fetch spot balance.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_spot_markets(exchange, opts \\ [])

Fetch spot markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_spot_ohlcv(exchange, symbol, timeframe, opts \\ [])

Fetch spot ohlcv.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • timeframe - timeframe (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    timeframe: %{description: "timeframe", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_spot_order(exchange, id, opts \\ [])

Fetch spot order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_spot_order_trades(exchange, id, opts \\ [])

Fetch spot order trades.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_spot_orders(exchange, opts \\ [])

Fetch spot orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_spot_orders_by_states(exchange, opts \\ [])

Fetch spot orders by states.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_spot_orders_by_status(exchange, opts \\ [])

Fetch spot orders by status.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_status(exchange, opts \\ [])

Fetch the exchange operational status.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_swap_and_future_markets(exchange, opts \\ [])

Fetch swap and future markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_swap_balance(exchange, opts \\ [])

Fetch swap balance.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_swap_markets(exchange, opts \\ [])

Fetch swap markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_ticker(exchange, symbol, opts \\ [])

Fetch latest ticker (price, volume, bid/ask) for a trading pair.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_tickers(exchange, opts \\ [])

Fetch tickers for all or specified trading pairs.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_time(exchange, opts \\ [])

Fetch the exchange server time.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_trades(exchange, symbol, opts \\ [])

Fetch recent public trades for a symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_trading_fee(exchange, symbol, opts \\ [])

Fetch the trading fee for a specific symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_trading_fees(exchange, opts \\ [])

Fetch trading fees for all symbols.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_trading_limits(exchange, opts \\ [])

Fetch trading limits.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_trading_limits_by_id(exchange, id, opts \\ [])

Fetch trading limits by id.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_transaction_fee(exchange, code, opts \\ [])

Fetch transaction fee.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_transaction_fees(exchange, opts \\ [])

Fetch transaction fees.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_transactions(exchange, opts \\ [])

Fetch transactions.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_transactions_by_type(exchange, type, opts \\ [])

Fetch transactions by type.

Parameters

  • exchange - Exchange configuration struct (value)
  • type - type (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_transfer(exchange, id, opts \\ [])

Fetch transfer.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_transfers(exchange, opts \\ [])

Fetch transfers.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_underlying_assets(exchange, opts \\ [])

Fetch underlying assets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_usdt_markets(exchange, opts \\ [])

Fetch usdt markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_uta_balance(exchange, opts \\ [])

Fetch uta balance.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_uta_canceled_and_closed_orders(exchange, opts \\ [])

Fetch uta canceled and closed orders.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_uta_markets(exchange, opts \\ [])

Fetch uta markets.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_uta_ohlcv(exchange, symbol, timeframe, opts \\ [])

Fetch uta ohlcv.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • timeframe - timeframe (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    timeframe: %{description: "timeframe", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_uta_order(exchange, id, opts \\ [])

Fetch uta order.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_uta_orders_by_status(exchange, opts \\ [])

Fetch uta orders by status.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_volatility_history(exchange, symbol, opts \\ [])

Fetch volatility history.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_withdraw_addresses(exchange, opts \\ [])

Fetch withdraw addresses.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_withdrawal(exchange, id, opts \\ [])

Fetch withdrawal.

Parameters

  • exchange - Exchange configuration struct (value)
  • id - id (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

fetch_withdrawals(exchange, opts \\ [])

Fetch withdrawal history.

Parameters

  • exchange - Exchange configuration struct (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

reduce_margin(exchange, amount, symbol, opts \\ [])

Reduce margin.

Parameters

  • exchange - Exchange configuration struct (value)
  • amount - amount (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

repay_cross_margin(exchange, code, amount, opts \\ [])

Repay cross margin.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

repay_isolated_margin(exchange, symbol, code, amount, opts \\ [])

Repay isolated margin.

Parameters

  • exchange - Exchange configuration struct (value)
  • symbol - symbol (value)
  • code - code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

repay_margin(exchange, code, amount, opts \\ [])

Repay margin.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

set_leverage(exchange, leverage, symbol, opts \\ [])

Set leverage for a symbol on the exchange.

Parameters

  • exchange - Exchange configuration struct (value)
  • leverage - leverage (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    leverage: %{description: "leverage", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

set_margin(exchange, amount, symbol, opts \\ [])

Set margin.

Parameters

  • exchange - Exchange configuration struct (value)
  • amount - amount (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

set_margin_mode(exchange, margin_mode, symbol, opts \\ [])

Set margin mode (cross/isolated) for a symbol.

Parameters

  • exchange - Exchange configuration struct (value)
  • margin_mode - margin mode (value)
  • symbol - symbol (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value},
    margin_mode: %{description: "margin mode", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

set_position_mode(exchange, hedge_mode, opts \\ [])

Set position mode.

Parameters

  • exchange - Exchange configuration struct (value)
  • hedge_mode - hedge mode (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    hedge_mode: %{description: "hedge mode", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

transfer(exchange, code, amount, from_account, to_account, opts \\ [])

Transfer funds between exchange accounts (e.g., spot to futures).

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)
  • from_account - from account (value)
  • to_account - to account (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value},
    from_account: %{description: "from account", kind: :value},
    to_account: %{description: "to account", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

transfer_between_main_and_sub_account(exchange, code, amount, from_account, to_account, opts \\ [])

Transfer between main and sub account.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)
  • from_account - from account (value)
  • to_account - to account (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value},
    from_account: %{description: "from account", kind: :value},
    to_account: %{description: "to account", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

transfer_between_sub_accounts(exchange, code, amount, from_account, to_account, opts \\ [])

Transfer between sub accounts.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)
  • from_account - from account (value)
  • to_account - to account (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value},
    from_account: %{description: "from account", kind: :value},
    to_account: %{description: "to account", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

transfer_classic(exchange, code, amount, from_account, to_account, opts \\ [])

Transfer classic.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)
  • from_account - from account (value)
  • to_account - to account (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value},
    from_account: %{description: "from account", kind: :value},
    to_account: %{description: "to account", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

transfer_out(exchange, code, amount, address, opts \\ [])

Transfer out.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)
  • address - address (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    address: %{description: "address", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

transfer_uta(exchange, code, amount, from_account, to_account, opts \\ [])

Transfer uta.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)
  • from_account - from account (value)
  • to_account - to account (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount", kind: :value},
    from_account: %{description: "from account", kind: :value},
    to_account: %{description: "to account", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}

withdraw(exchange, code, amount, address, opts \\ [])

Withdraw funds to an external address.

Parameters

  • exchange - Exchange configuration struct (value)
  • code - code (value)
  • amount - amount (value)
  • address - address (value)

Returns

{:ok, map()} on success, {:error, CCXT.Error.t()} on failure (result_tuple)

Errors

  • :not_supported
  • :authentication_error
  • :rate_limit_exceeded
  • :network_error
# descripex:contract
%{
  params: %{
    code: %{description: "code", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    address: %{description: "address", kind: :value},
    amount: %{description: "amount", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :rate_limit_exceeded,
   :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, CCXT.Error.t()} on failure"
  }
}