# `Bourse`
[🔗](https://github.com/ZenHive/bourse/blob/main/lib/bourse.ex#L1)

Unified cryptocurrency exchange client library.

A provider-authored Elixir client for eleven supported exchanges. Exchange
modules are generated from complete owned specs listed by the closed runtime
manifest. The version-pinned CCXT corpus is authoring and compatibility
reference material only.

## Architecture

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

## Quick Start

    # List available exchanges
    Bourse.Spec.exchanges()

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

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

    {:ok, response} = Bourse.fetch_ticker(bybit, "BTC/USDT")

    # Cache markets when a venue needs market metadata at dispatch time
    # (e.g. lighter symbol → numeric market_id). Thread the enriched struct.
    {:ok, lighter} = Bourse.exchange("lighter")
    {:ok, lighter} = Bourse.load_markets(lighter)
    {:ok, response} = Bourse.fetch_ticker(lighter, "BTC/USDC:USDC")

    # Create an order (private, requires credentials)
    {:ok, response} = Bourse.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 Bourse parameters (since, limit, price, symbol when optional, etc.)
and exchange-specific parameters are passed via opts:

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

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

Order creation and editing may opt into client-side market validation with
`sanity: true`. It is disabled by default so that existing callers keep the
exchange's own validation contract — enabling it by default would turn orders
that the venue accepts today into local failures. Validation is skipped (never
raised) until markets are loaded with `Bourse.load_markets/1`, since the limits
it checks live in market metadata.

A rejected order returns `{:error, %Bourse.Error{type: :invalid_order}}` before
any HTTP request is issued; the per-check messages are in `hints`, and
`raw["sanity_check"]` maps each failed check name to its message.

## API Functions
| Function | Arity | Description | Param Kinds |
| --- | --- | --- | --- |
| `create_gift_code` | 4 | Create gift code. | `exchange: value`, `code: value`, `amount: value` |
| `create_vault` | 4 | Create vault. | `exchange: value`, `code: value`, `amount: value` |
| `fetch_portfolio_details` | 3 | Fetch portfolio details. | `exchange: value`, `portfolio_id: value` |
| `fetch_portfolios` | 2 | Fetch portfolios. | `exchange: value` |
| `fetch_settlement_history` | 2 | Fetch settlement history. | `exchange: value` |
| `fetch_convert_trade_history` | 2 | Fetch convert trade history. | `exchange: value` |
| `fetch_convert_trade` | 3 | Fetch convert trade. | `exchange: value`, `id: value` |
| `fetch_convert_quote` | 5 | Fetch convert quote. | `exchange: value`, `from_code: value`, `to_code: value`, `amount: value` |
| `fetch_convert_currencies` | 2 | Fetch convert currencies. | `exchange: value` |
| `create_convert_trade` | 6 | Create convert trade. | `exchange: value`, `id: value`, `from_code: value`, `to_code: value`, `amount: value` |
| `fetch_isolated_borrow_rates` | 2 | Fetch isolated borrow rates. | `exchange: value` |
| `fetch_isolated_borrow_rate` | 3 | Fetch isolated borrow rate. | `exchange: value`, `symbol: value` |
| `fetch_cross_borrow_rates` | 2 | Fetch cross borrow rates. | `exchange: value` |
| `fetch_cross_borrow_rate` | 3 | Fetch cross borrow rate. | `exchange: value`, `code: value` |
| `fetch_borrow_rate_histories` | 2 | Fetch borrow rate histories. | `exchange: value` |
| `fetch_borrow_rate_history` | 3 | Fetch borrow rate history. | `exchange: value`, `code: value` |
| `fetch_borrow_interest` | 2 | Fetch borrow interest. | `exchange: value` |
| `repay_margin` | 4 | Repay margin. | `exchange: value`, `code: value`, `amount: value` |
| `repay_isolated_margin` | 5 | Repay isolated margin. | `exchange: value`, `symbol: value`, `code: value`, `amount: value` |
| `repay_cross_margin` | 4 | Repay cross margin. | `exchange: value`, `code: value`, `amount: value` |
| `borrow_isolated_margin` | 5 | Borrow isolated margin. | `exchange: value`, `symbol: value`, `code: value`, `amount: value` |
| `borrow_cross_margin` | 4 | Borrow cross margin. | `exchange: value`, `code: value`, `amount: value` |
| `transfer_uta` | 6 | Transfer uta. | `exchange: value`, `code: value`, `amount: value`, `from_account: value`, `to_account: value` |
| `transfer_out` | 5 | Transfer out. | `exchange: value`, `code: value`, `amount: value`, `address: value` |
| `transfer_classic` | 6 | Transfer classic. | `exchange: value`, `code: value`, `amount: value`, `from_account: value`, `to_account: value` |
| `transfer_between_sub_accounts` | 6 | Transfer between sub accounts. | `exchange: value`, `code: value`, `amount: value`, `from_account: value`, `to_account: value` |
| `transfer_between_main_and_sub_account` | 6 | Transfer between main and sub account. | `exchange: value`, `code: value`, `amount: value`, `from_account: value`, `to_account: value` |
| `fetch_transfers` | 2 | Fetch transfers. | `exchange: value` |
| `fetch_transfer` | 3 | Fetch transfer. | `exchange: value`, `id: value` |
| `transfer` | 6 | Transfer funds between exchange accounts (e.g., spot to futures). | `exchange: value`, `code: value`, `amount: value`, `from_account: value`, `to_account: value` |
| `fetch_transactions_by_type` | 3 | Fetch transactions by type. | `exchange: value`, `type: value` |
| `fetch_transactions` | 2 | Fetch transactions. | `exchange: value` |
| `fetch_deposits_withdrawals` | 2 | Fetch deposits withdrawals. | `exchange: value` |
| `fetch_public_deposit_withdraw_fees` | 2 | Fetch public deposit withdraw fees. | `exchange: value` |
| `fetch_private_deposit_withdraw_fees` | 2 | Fetch private deposit withdraw fees. | `exchange: value` |
| `fetch_deposit_withdraw_fees` | 2 | Fetch deposit withdraw fees. | `exchange: value` |
| `fetch_deposit_withdraw_fee` | 3 | Fetch deposit withdraw fee. | `exchange: value`, `code: value` |
| `fetch_contract_deposits` | 2 | Fetch contract deposits. | `exchange: value` |
| `fetch_contract_withdrawals` | 2 | Fetch contract withdrawals. | `exchange: value` |
| `fetch_withdraw_addresses` | 2 | Fetch withdraw addresses. | `exchange: value` |
| `fetch_withdrawals` | 2 | Fetch withdrawal history. | `exchange: value` |
| `fetch_withdrawal` | 3 | Fetch withdrawal. | `exchange: value`, `id: value` |
| `withdraw` | 5 | Withdraw funds to an external address. | `exchange: value`, `code: value`, `amount: value`, `address: value` |
| `fetch_payment_methods` | 2 | Fetch payment methods. | `exchange: value` |
| `fetch_deposit_methods` | 3 | Fetch deposit methods. | `exchange: value`, `code: value` |
| `fetch_deposit_method_ids` | 2 | Fetch deposit method ids. | `exchange: value` |
| `fetch_deposit_method_id` | 3 | Fetch deposit method id. | `exchange: value`, `code: value` |
| `create_deposit_address` | 3 | Create deposit address. | `exchange: value`, `code: value` |
| `fetch_contract_deposit_address` | 3 | Fetch contract deposit address. | `exchange: value`, `code: value` |
| `fetch_network_deposit_address` | 3 | Fetch network deposit address. | `exchange: value`, `code: value` |
| `fetch_deposit_addresses_by_network` | 3 | Fetch deposit addresses by network. | `exchange: value`, `code: value` |
| `fetch_deposit_addresses` | 2 | Fetch deposit addresses. | `exchange: value` |
| `fetch_deposit_address` | 3 | Fetch a deposit address for a currency. | `exchange: value`, `code: value` |
| `fetch_deposits` | 2 | Fetch deposit history. | `exchange: value` |
| `fetch_deposit` | 3 | Fetch deposit. | `exchange: value`, `id: value` |
| `fetch_ledger_entries_by_ids` | 3 | Fetch ledger entries by ids. | `exchange: value`, `ids: value` |
| `fetch_ledger_by_entries` | 2 | Fetch ledger by entries. | `exchange: value` |
| `fetch_ledger_entry` | 3 | Fetch ledger entry. | `exchange: value`, `id: value` |
| `fetch_ledger` | 2 | Fetch the account ledger. Entry types use registered unified values (trade, fee, deposit, withdrawal, transfer, funding_fee, realized_pnl, liquidation, settlement, interest, rebate, commission, cashback, referral, conversion, bonus) or a venue-faithful snake_case label for mapped events outside the registry. Scopes with enum passthrough (base maps and routed maps alike) emit the provider's raw literal for any type outside their mapped set; the venue literal is always retained in info. | `exchange: value` |
| `fetch_public_transaction_fees` | 2 | Fetch public transaction fees. | `exchange: value` |
| `fetch_private_transaction_fees` | 2 | Fetch private transaction fees. | `exchange: value` |
| `fetch_transaction_fees` | 2 | Fetch transaction fees. | `exchange: value` |
| `fetch_transaction_fee` | 3 | Fetch transaction fee. | `exchange: value`, `code: value` |
| `fetch_public_trading_fees` | 2 | Fetch public trading fees. | `exchange: value` |
| `fetch_public_trading_fee` | 3 | Fetch public trading fee. | `exchange: value`, `symbol: value` |
| `fetch_private_trading_fees` | 2 | Fetch private trading fees. | `exchange: value` |
| `fetch_private_trading_fee` | 3 | Fetch private trading fee. | `exchange: value`, `symbol: value` |
| `fetch_trading_limits_by_id` | 3 | Fetch trading limits by id. | `exchange: value`, `id: value` |
| `fetch_trading_limits` | 2 | Fetch trading limits. | `exchange: value` |
| `fetch_trading_fees` | 2 | Fetch trading fees for all symbols. | `exchange: value` |
| `fetch_trading_fee` | 3 | Fetch the trading fee for a specific symbol. | `exchange: value`, `symbol: value` |
| `fetch_margin_adjustment_history` | 2 | Fetch margin adjustment history. | `exchange: value` |
| `reduce_margin` | 4 | Reduce margin. | `exchange: value`, `symbol: value`, `amount: value` |
| `add_margin` | 4 | Add margin. | `exchange: value`, `symbol: value`, `amount: value` |
| `set_margin` | 4 | Set margin. | `exchange: value`, `symbol: value`, `amount: value` |
| `set_margin_mode` | 4 | Set margin mode (cross/isolated) for a symbol. | `exchange: value`, `margin_mode: value`, `symbol: value` |
| `fetch_margin_modes` | 2 | Fetch margin modes. | `exchange: value` |
| `fetch_margin_mode` | 3 | Fetch margin mode. | `exchange: value`, `symbol: value` |
| `set_leverage` | 4 | Set leverage for a symbol on the exchange. | `exchange: value`, `leverage: value`, `symbol: value` |
| `fetch_leverage_tiers` | 2 | Fetch leverage tiers. | `exchange: value` |
| `fetch_leverages` | 2 | Fetch leverages. | `exchange: value` |
| `fetch_leverage` | 3 | Fetch current leverage setting for a symbol. | `exchange: value`, `symbol: value` |
| `set_position_mode` | 3 | Set position mode. | `exchange: value`, `hedge_mode: value` |
| `fetch_position_mode` | 2 | Fetch position mode. | `exchange: value` |
| `close_all_positions` | 2 | Close all positions. | `exchange: value` |
| `close_position` | 3 | Close a derivative position for a symbol. | `exchange: value`, `symbol: value` |
| `fetch_position_adl_rank` | 3 | Fetch position adl rank. | `exchange: value`, `symbol: value` |
| `fetch_positions_adl_rank` | 2 | Fetch positions adl rank. | `exchange: value` |
| `fetch_positions_risk` | 2 | Fetch positions risk. | `exchange: value` |
| `fetch_position_history` | 2 | Fetch position history. | `exchange: value` |
| `fetch_positions_history` | 2 | Fetch positions history. | `exchange: value` |
| `fetch_positions_for_symbol` | 3 | Fetch positions for symbol. | `exchange: value`, `symbol: value` |
| `fetch_positions` | 2 | Fetch all open derivative positions. | `exchange: value` |
| `fetch_position` | 3 | Fetch a specific derivative position for a symbol. | `exchange: value`, `symbol: value` |
| `fetch_my_settlement_history` | 2 | Fetch my settlement history. | `exchange: value` |
| `fetch_my_liquidations` | 2 | Fetch my liquidations. | `exchange: value` |
| `fetch_my_dust_trades` | 2 | Fetch my dust trades. | `exchange: value` |
| `fetch_my_sells` | 2 | Fetch my sells. | `exchange: value` |
| `fetch_my_buys` | 2 | Fetch my buys. | `exchange: value` |
| `fetch_my_uta_trades` | 2 | Fetch my uta trades. | `exchange: value` |
| `fetch_my_contract_trades` | 2 | Fetch my contract trades. | `exchange: value` |
| `fetch_my_spot_trades` | 2 | Fetch my spot trades. | `exchange: value` |
| `fetch_my_trades` | 2 | Fetch the authenticated user's trade history. | `exchange: value` |
| `create_sub_account` | 2 | Create sub account. | `exchange: value` |
| `create_account` | 2 | Create account. | `exchange: value` |
| `fetch_account_positions` | 2 | Fetch account positions. | `exchange: value` |
| `fetch_account_facts` | 2 | Fetch provider-observed product access, account margin model, and position margin modes. | `exchange: value` |
| `fetch_accounts` | 2 | Fetch accounts. | `exchange: value` |
| `fetch_account` | 2 | Fetch account. | `exchange: value` |
| `fetch_uta_balance` | 2 | Fetch uta balance. | `exchange: value` |
| `fetch_financial_balance` | 2 | Fetch financial balance. | `exchange: value` |
| `fetch_margin_balance` | 2 | Fetch margin balance. | `exchange: value` |
| `fetch_contract_balance` | 2 | Fetch contract balance. | `exchange: value` |
| `fetch_spot_balance` | 2 | Fetch spot balance. | `exchange: value` |
| `fetch_balance` | 2 | Fetch account balance across all currencies. | `exchange: value` |
| `fetch_adl_rank` | 2 | Fetch adl rank. | `exchange: value` |
| `fetch_uta_canceled_and_closed_orders` | 2 | Fetch uta canceled and closed orders. | `exchange: value` |
| `fetch_uta_orders_by_status` | 2 | Fetch uta orders by status. | `exchange: value` |
| `fetch_uta_order` | 3 | Fetch uta order. | `exchange: value`, `id: value` |
| `fetch_contract_orders_by_status` | 2 | Fetch contract orders by status. | `exchange: value` |
| `fetch_contract_orders` | 2 | Fetch contract orders. | `exchange: value` |
| `fetch_contract_order` | 3 | Fetch contract order. | `exchange: value`, `id: value` |
| `fetch_canceled_and_closed_swap_orders` | 2 | Fetch canceled and closed swap orders. | `exchange: value` |
| `fetch_canceled_and_closed_spot_orders` | 2 | Fetch canceled and closed spot orders. | `exchange: value` |
| `fetch_closed_contract_orders` | 2 | Fetch closed contract orders. | `exchange: value` |
| `fetch_closed_spot_orders` | 2 | Fetch closed spot orders. | `exchange: value` |
| `fetch_open_swap_orders` | 2 | Fetch open swap orders. | `exchange: value` |
| `fetch_open_spot_orders` | 2 | Fetch open spot orders. | `exchange: value` |
| `fetch_spot_orders_by_status` | 2 | Fetch spot orders by status. | `exchange: value` |
| `fetch_spot_orders_by_states` | 2 | Fetch spot orders by states. | `exchange: value` |
| `fetch_spot_order_trades` | 3 | Fetch spot order trades. | `exchange: value`, `id: value` |
| `fetch_spot_orders` | 2 | Fetch spot orders. | `exchange: value` |
| `fetch_spot_order` | 3 | Fetch spot order. | `exchange: value`, `id: value` |
| `fetch_orders_by_type` | 3 | Fetch orders by type. | `exchange: value`, `type: value` |
| `fetch_orders_by_status` | 3 | Fetch orders by status. | `exchange: value`, `status: value` |
| `fetch_orders_by_state` | 3 | Fetch orders by state. | `exchange: value`, `state: value` |
| `fetch_orders_by_ids` | 3 | Fetch orders by ids. | `exchange: value`, `ids: value` |
| `fetch_order_status` | 3 | Fetch order status. | `exchange: value`, `id: value` |
| `fetch_order_trades` | 3 | Fetch order trades. | `exchange: value`, `id: value` |
| `fetch_canceled_and_closed_orders` | 2 | Fetch canceled and closed orders. | `exchange: value` |
| `fetch_canceled_orders` | 2 | Fetch canceled orders. | `exchange: value` |
| `fetch_closed_orders` | 2 | Fetch completed (filled) orders. | `exchange: value` |
| `fetch_closed_order` | 3 | Fetch closed order. | `exchange: value`, `id: value` |
| `fetch_open_order_lists` | 2 | Fetch currently open order groups. | `exchange: value` |
| `fetch_open_orders` | 2 | Fetch all currently open orders. | `exchange: value` |
| `fetch_open_order` | 3 | Fetch open order. | `exchange: value`, `id: value` |
| `fetch_order_lists` | 2 | Fetch historical order groups. | `exchange: value` |
| `fetch_order_list` | 3 | Fetch a specific order group by its exchange list ID. | `exchange: value`, `id: value` |
| `fetch_orders_classic` | 2 | Fetch orders classic. | `exchange: value` |
| `fetch_orders` | 2 | Fetch a list of orders, optionally filtered by symbol. | `exchange: value` |
| `fetch_order_classic` | 3 | Fetch order classic. | `exchange: value`, `id: value` |
| `fetch_order` | 3 | Fetch details of a specific order by ID. | `exchange: value`, `id: value` |
| `edit_spot_order` | 6 | Edit spot order. | `exchange: value`, `id: value`, `symbol: value`, `type: value`, `side: value` |
| `edit_contract_order` | 6 | Edit contract order. | `exchange: value`, `id: value`, `symbol: value`, `type: value`, `side: value` |
| `edit_orders` | 3 | Edit orders. | `exchange: value`, `orders: value` |
| `edit_order` | 6 | Edit an existing order (modify price, amount, etc.). | `exchange: value`, `id: value`, `symbol: value`, `type: value`, `side: value` |
| `cancel_all_uta_orders` | 2 | Cancel all uta orders. | `exchange: value` |
| `cancel_all_contract_orders` | 2 | Cancel all contract orders. | `exchange: value` |
| `cancel_all_spot_orders` | 2 | Cancel all spot orders. | `exchange: value` |
| `cancel_twap_order` | 3 | Cancel twap order. | `exchange: value`, `id: value` |
| `cancel_uta_orders` | 3 | Cancel uta orders. | `exchange: value`, `ids: value` |
| `cancel_uta_order` | 3 | Cancel uta order. | `exchange: value`, `id: value` |
| `cancel_unified_order` | 3 | Cancel unified order. | `exchange: value`, `id: value` |
| `cancel_contract_order` | 3 | Cancel contract order. | `exchange: value`, `id: value` |
| `cancel_spot_order` | 3 | Cancel spot order. | `exchange: value`, `id: value` |
| `cancel_orders_for_symbols` | 3 | Cancel orders for symbols. | `exchange: value`, `orders: value` |
| `cancel_all_orders_after` | 3 | Cancel all orders after. | `exchange: value`, `timeout: value` |
| `cancel_all_orders` | 2 | Cancel all open orders, optionally filtered by symbol. | `exchange: value` |
| `cancel_orders` | 3 | Cancel orders. | `exchange: value`, `ids: value` |
| `cancel_order` | 3 | Cancel an existing order by ID. | `exchange: value`, `id: value` |
| `create_market_order_with_cost` | 5 | Create market order with cost. | `exchange: value`, `symbol: value`, `side: value`, `cost: value` |
| `create_market_sell_order_with_cost` | 4 | Create market sell order with cost. | `exchange: value`, `symbol: value`, `cost: value` |
| `create_market_buy_order_with_cost` | 4 | Create market buy order with cost. | `exchange: value`, `symbol: value`, `cost: value` |
| `create_twap_order` | 6 | Create twap order. | `exchange: value`, `symbol: value`, `side: value`, `amount: value`, `duration: value` |
| `create_trailing_percent_order` | 6 | Create trailing percent order. | `exchange: value`, `symbol: value`, `type: value`, `side: value`, `amount: value` |
| `create_trailing_amount_order` | 6 | Create trailing amount order. | `exchange: value`, `symbol: value`, `type: value`, `side: value`, `amount: value` |
| `create_order_with_take_profit_and_stop_loss` | 6 | Create order with take profit and stop loss. | `exchange: value`, `symbol: value`, `type: value`, `side: value`, `amount: value` |
| `create_uta_orders` | 3 | Create uta orders. | `exchange: value`, `orders: value` |
| `create_uta_order` | 6 | Create uta order. | `exchange: value`, `symbol: value`, `type: value`, `side: value`, `amount: value` |
| `create_swap_order` | 6 | Create swap order. | `exchange: value`, `symbol: value`, `type: value`, `side: value`, `amount: value` |
| `create_contract_orders` | 3 | Create contract orders. | `exchange: value`, `orders: value` |
| `create_contract_order` | 6 | Create contract order. | `exchange: value`, `symbol: value`, `type: value`, `side: value`, `amount: value` |
| `create_spot_orders` | 3 | Create spot orders. | `exchange: value`, `orders: value` |
| `create_spot_order` | 6 | Create spot order. | `exchange: value`, `symbol: value`, `type: value`, `side: value`, `amount: value` |
| `create_orders` | 3 | Create multiple orders in a single request. | `exchange: value`, `orders: value` |
| `create_order` | 6 | Create a new order on the exchange. | `exchange: value`, `symbol: value`, `type: value`, `side: value`, `amount: value` |
| `fetch_contract_tickers` | 2 | Fetch contract tickers. | `exchange: value` |
| `fetch_uta_ohlcv` | 4 | Fetch uta ohlcv. | `exchange: value`, `symbol: value`, `timeframe: value` |
| `fetch_spot_ohlcv` | 4 | Fetch spot ohlcv. | `exchange: value`, `symbol: value`, `timeframe: value` |
| `fetch_contract_ohlcv` | 4 | Fetch contract ohlcv. | `exchange: value`, `symbol: value`, `timeframe: value` |
| `fetch_option_ohlcv` | 4 | Fetch option ohlcv. | `exchange: value`, `symbol: value`, `timeframe: value` |
| `fetch_option_positions` | 2 | Fetch option positions. | `exchange: value` |
| `fetch_option_underlyings` | 2 | Fetch option underlyings. | `exchange: value` |
| `fetch_underlying_assets` | 2 | Fetch underlying assets. | `exchange: value` |
| `fetch_all_greeks` | 2 | Fetch all greeks. | `exchange: value` |
| `fetch_greeks` | 3 | Fetch option greeks (delta, gamma, theta, vega) for a symbol. | `exchange: value`, `symbol: value` |
| `fetch_option_chain` | 3 | Fetch the full options chain for an underlying asset. | `exchange: value`, `symbol: value` |
| `fetch_option` | 3 | Fetch option. | `exchange: value`, `symbol: value` |
| `fetch_volatility_history` | 3 | Fetch volatility history. | `exchange: value`, `symbol: value` |
| `fetch_liquidations` | 3 | Fetch recent liquidation events for a symbol. | `exchange: value`, `symbol: value` |
| `fetch_long_short_ratio_history` | 3 | Fetch long short ratio history. | `exchange: value`, `symbol: value` |
| `fetch_derivatives_open_interest_history` | 3 | Fetch derivatives open interest history. | `exchange: value`, `symbol: value` |
| `fetch_open_interests` | 2 | Fetch open interests. | `exchange: value` |
| `fetch_open_interest_history` | 3 | Fetch open interest history. | `exchange: value`, `symbol: value` |
| `fetch_open_interest` | 3 | Fetch open interest for a perpetual or futures symbol. | `exchange: value`, `symbol: value` |
| `fetch_funding_limits` | 2 | Fetch funding limits. | `exchange: value` |
| `fetch_funding_intervals` | 2 | Fetch funding intervals. | `exchange: value` |
| `fetch_funding_interval` | 3 | Fetch funding interval. | `exchange: value`, `symbol: value` |
| `fetch_funding_history` | 3 | Fetch funding history. | `exchange: value`, `symbol: value` |
| `fetch_funding_rate_history` | 3 | Fetch funding rate history. | `exchange: value`, `symbol: value` |
| `fetch_funding_rates` | 2 | Fetch funding rates for all perpetual swaps. | `exchange: value` |
| `fetch_funding_rate` | 3 | Fetch the current funding rate for a perpetual swap. | `exchange: value`, `symbol: value` |
| `fetch_derivatives_market_leverage_tiers` | 3 | Fetch derivatives market leverage tiers. | `exchange: value`, `symbol: value` |
| `fetch_market_leverage_tiers` | 3 | Fetch market leverage tiers. | `exchange: value`, `symbol: value` |
| `fetch_mark_prices` | 2 | Fetch mark prices. | `exchange: value` |
| `fetch_mark_price` | 3 | Fetch the mark price for a derivative symbol. | `exchange: value`, `symbol: value` |
| `fetch_market_by_id` | 3 | Fetch market by id. | `exchange: value`, `id: value` |
| `fetch_market` | 3 | Fetch market. | `exchange: value`, `symbol: value` |
| `fetch_last_prices` | 2 | Fetch last prices. | `exchange: value` |
| `fetch_bids_asks` | 2 | Fetch bids asks. | `exchange: value` |
| `fetch_status` | 2 | Fetch the exchange operational status. | `exchange: value` |
| `fetch_time` | 2 | Fetch the exchange server time. | `exchange: value` |
| `fetch_currency_by_id` | 3 | Fetch currency by id. | `exchange: value`, `id: value` |
| `fetch_currency` | 3 | Fetch currency. | `exchange: value`, `code: value` |
| `fetch_currencies` | 2 | Fetch all available currencies and their details. | `exchange: value` |
| `fetch_usdt_markets` | 2 | Fetch usdt markets. | `exchange: value` |
| `fetch_swap_balance` | 2 | Fetch swap balance. | `exchange: value` |
| `fetch_uta_markets` | 2 | Fetch uta markets. | `exchange: value` |
| `fetch_inverse_swap_markets` | 2 | Fetch inverse swap markets. | `exchange: value` |
| `fetch_swap_and_future_markets` | 2 | Fetch swap and future markets. | `exchange: value` |
| `fetch_contract_markets` | 2 | Fetch contract markets. | `exchange: value` |
| `fetch_option_markets` | 2 | Fetch option markets. | `exchange: value` |
| `fetch_future_markets` | 2 | Fetch future markets. | `exchange: value` |
| `fetch_swap_markets` | 2 | Fetch swap markets. | `exchange: value` |
| `fetch_spot_markets` | 2 | Fetch spot markets. | `exchange: value` |
| `fetch_markets_by_type_and_sub_type` | 4 | Fetch markets by type and sub type. | `exchange: value`, `type: value`, `sub_type: value` |
| `fetch_markets_by_type` | 3 | Fetch markets by type. | `exchange: value`, `type: value` |
| `fetch_markets` | 2 | Fetch all available markets and trading pairs. | `exchange: value` |
| `fetch_ohlcv` | 4 | Fetch OHLCV candlestick data for a symbol and timeframe. | `exchange: value`, `symbol: value`, `timeframe: value` |
| `fetch_trades` | 3 | Fetch recent public trades for a symbol. | `exchange: value`, `symbol: value` |
| `fetch_l3_order_book` | 3 | Fetch l3 order book. | `exchange: value`, `symbol: value` |
| `fetch_l2_order_book` | 3 | Fetch l2 order book. | `exchange: value`, `symbol: value` |
| `fetch_order_books` | 2 | Fetch order books. | `exchange: value` |
| `fetch_order_book` | 3 | Fetch the order book (bids and asks) for a symbol. | `exchange: value`, `symbol: value` |
| `fetch_tickers` | 2 | Fetch tickers for all or specified trading pairs. | `exchange: value` |
| `fetch_ticker` | 3 | Fetch latest ticker (price, volume, bid/ask) for a trading pair. | `exchange: value`, `symbol: value` |
| `load_markets` | 2 | Fetch markets and return an enriched exchange with the markets cache set. | `exchange: value` |
| `doc_urls` | 1 | Returns the documentation URL doc-set (logo/www/doc/fees/api_management) for an exchange. | `exchange: value` |
| `config` | 1 | Returns the derived config metadata (credentials/limits/status/routing/flags) for an exchange. | `exchange: value` |
| `fees` | 1 | Returns the static default fee schedule for an exchange. | `exchange: value` |
| `timeframes` | 1 | Returns unified-to-native OHLCV timeframe labels for an exchange. | `exchange: value` |
| `exchange` | 2 | Create an exchange configuration. | `exchange_id: value` |

# `__descripex_modules__`

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

Return the list of modules registered with this library.

# `add_margin`

Add margin.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)
  * `amount` - amount of margin to add (TS: number) (value)

## Returns

\{:ok, a [margin structure]\{@link https://docs.ccxt.com/?id=margin-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<MarginModification>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value},
    amount: %{description: "amount of margin to add (TS: number)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<MarginModification>)"
  }
}
```

# `borrow_cross_margin`

Borrow cross margin.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (TS: string) (value)
  * `amount` - amount (TS: float) (value)

## Returns

\{:ok, a margin loan structure\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<MarginLoan>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    code: %{description: "code (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount (TS: float)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a margin loan structure} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<MarginLoan>)"
  }
}
```

# `borrow_isolated_margin`

Borrow isolated margin.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)
  * `code` - code (value)
  * `amount` - amount (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `cancel_all_contract_orders`

Cancel all contract orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_all_orders`

Cancel all open orders, optionally filtered by symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_all_orders_after`

Cancel all orders after.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `timeout` - timeout (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_all_spot_orders`

Cancel all spot orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_all_uta_orders`

Cancel all uta orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_contract_order`

Cancel contract order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_order`

Cancel an existing order by ID.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - order id (TS: string) (value)

## Options

  * `order_filter` - *spot only* 'Order' or 'StopOrder' or 'tpslOrder'
  * `stop` - alias for trigger
  * `symbol` - unified symbol of the market the order was made in (TS: Str)
  * `trigger` - *spot only* whether the order is a trigger order

## Returns

\{:ok, Canceled-order acknowledgement.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    stop: %{description: "alias for trigger", kind: :value},
    symbol: %{
      description: "unified symbol of the market the order was made in (TS: Str)",
      kind: :value
    },
    order_filter: %{
      description: "*spot only* 'Order' or 'StopOrder' or 'tpslOrder'",
      kind: :value
    },
    trigger: %{
      description: "*spot only* whether the order is a trigger order",
      kind: :value
    }
  },
  params: %{
    id: %{description: "order id (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Canceled-order acknowledgement.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `cancel_orders`

Cancel orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `ids` - order ids (TS: string[]) (value)

## Options

  * `client_order_ids` - client order ids
  * `symbol` - unified symbol of the market the order was made in (TS: Str)

## Returns

\{:ok, an list of [order structures]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{
      description: "unified symbol of the market the order was made in (TS: Str)",
      kind: :value
    },
    client_order_ids: %{description: "client order ids", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    ids: %{description: "order ids (TS: string[])", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `cancel_orders_for_symbols`

Cancel orders for symbols.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `orders` - orders (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_spot_order`

Cancel spot order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_twap_order`

Cancel twap order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_unified_order`

Cancel unified order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_uta_order`

Cancel uta order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `cancel_uta_orders`

Cancel uta orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `ids` - ids (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `close_all_positions`

Close all positions.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `close_position`

Close a derivative position for a symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - Unified CCXT market symbol (TS: string) (value)

## Options

  * `auto_cxl` - whether any pending orders for closing out needs to be automatically canceled when close position via a market order. false or true, the default is false
  * `client_order_id` - a unique identifier for the order
  * `code` - *required in the case of closing cross MARGIN position for Single-currency margin* margin currency  EXCHANGE SPECIFIC PARAMETERS
  * `margin_mode` - 'cross' or 'isolated', default is 'cross;
  * `side` - 'buy' or 'sell', leave as undefined in net mode (TS: OrderSide)
  * `tag` - order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters

## Returns

\{:ok, [A list of position structures]\{@link https://docs.ccxt.com/?id=position-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    code: %{
      description: "*required in the case of closing cross MARGIN position for Single-currency margin* margin currency  EXCHANGE SPECIFIC PARAMETERS",
      kind: :value
    },
    tag: %{
      description: "order tag a combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters",
      kind: :value
    },
    side: %{
      description: "'buy' or 'sell', leave as undefined in net mode (TS: OrderSide)",
      kind: :value
    },
    margin_mode: %{
      description: "'cross' or 'isolated', default is 'cross;",
      kind: :value
    },
    client_order_id: %{
      description: "a unique identifier for the order",
      kind: :value
    },
    auto_cxl: %{
      description: "whether any pending orders for closing out needs to be automatically canceled when close position via a market order. false or true, the default is false",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "Unified CCXT market symbol (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, [A list of position structures]{@link https://docs.ccxt.com/?id=position-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `config`

```elixir
@spec config(Bourse.Exchange.t()) :: Bourse.Exchange.config()
```

Returns the derived config metadata (credentials/limits/status/routing/flags) for an exchange.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

Deterministic describe() config metadata, or an empty map when the spec predates the contract (`map`)

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  returns: %{
    type: :map,
    description: "Deterministic describe() config metadata, or an empty map when the spec predates the contract"
  }
}
```

# `create_account`

Create account.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `create_contract_order`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_contract_orders`

Create contract orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `orders` - orders (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `create_convert_trade`

Create convert trade.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - the id of the trade that you want to make (TS: string) (value)
  * `from_code` - from code (TS: string) (value)
  * `to_code` - to code (TS: string) (value)
  * `amount` - how much you want to trade in units of the from currency (TS: Num) (value)

## Returns

\{:ok, a [conversion structure]\{@link https://docs.ccxt.com/?id=conversion-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Conversion>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    id: %{
      description: "the id of the trade that you want to make (TS: string)",
      kind: :value
    },
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{
      description: "how much you want to trade in units of the from currency (TS: Num)",
      kind: :value
    },
    from_code: %{description: "from code (TS: string)", kind: :value},
    to_code: %{description: "to code (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [conversion structure]{@link https://docs.ccxt.com/?id=conversion-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Conversion>)"
  }
}
```

# `create_deposit_address`

Create deposit address.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - unified currency code of the currency for the deposit address (TS: string) (value)

## Returns

\{:ok, an [address structure]\{@link https://docs.ccxt.com/?id=address-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<DepositAddress>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    code: %{
      description: "unified currency code of the currency for the deposit address (TS: string)",
      kind: :value
    },
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [address structure]{@link https://docs.ccxt.com/?id=address-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<DepositAddress>)"
  }
}
```

# `create_gift_code`

Create gift code.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)
  * `amount` - amount (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_market_buy_order_with_cost`

Create market buy order with cost.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to create an order in (TS: string) (value)
  * `cost` - how much you want to trade in units of the quote currency (TS: number) (value)

## Returns

\{:ok, an [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to create an order in (TS: string)",
      kind: :value
    },
    cost: %{
      description: "how much you want to trade in units of the quote currency (TS: number)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `create_market_order_with_cost`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_market_sell_order_with_cost`

Create market sell order with cost.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to create an order in (TS: string) (value)
  * `cost` - how much you want to trade in units of the quote currency (TS: number) (value)

## Returns

\{:ok, an [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to create an order in (TS: string)",
      kind: :value
    },
    cost: %{
      description: "how much you want to trade in units of the quote currency (TS: number)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `create_order`

Create a new order on the exchange.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to create an order in (TS: string) (value)
  * `type` - 'market' or 'limit' (TS: OrderType) (value)
  * `side` - 'buy' or 'sell' (TS: OrderSide) (value)
  * `amount` - how much of currency you want to trade in units of base currency (TS: number) (value)

## Options

  * `hedged` - *contracts only* true for hedged mode, false for one way mode, default is false
  * `is_leverage` - *unified spot only* false then spot trading true then margin trading
  * `mmp` - *option only* market maker protection
  * `position_idx` - *contracts only* 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode
  * `post_only` - true or false whether the order is post-only
  * `price` - the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders (TS: Num)
  * `reduce_only` - true or false whether the order is reduce-only
  * `stop_loss` - *stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered
  * `stop_loss/trigger_price` - stop loss trigger price
  * `stop_loss_limit_price` - The limit price for a stoploss order (only when used in OCO with takeProfitPrice)
  * `stop_loss_price` - The price at which a stop loss order is triggered at
  * `take_profit` - *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
  * `take_profit/trigger_price` - take profit trigger price
  * `take_profit_limit_price` - The limit price for a takeprofit order (only when used in OCO combination with stopLossPrice)
  * `take_profit_price` - The price at which a take profit order is triggered at
  * `time_in_force` - "GTC", "IOC", "FOK"
  * `tpsl_mode` - *contract only* 'Full' or 'Partial'
  * `trading_stop_endpoint` - whether to enforce using the tradingStop (https://bybit-exchange.github.io/docs/v5/position/trading-stop) endpoint, makes difference when submitting single tp/sl order
  * `trailing_amount` - the quote amount to trail away from the current market price
  * `trailing_trigger_price` - the price to trigger a trailing order, default uses the price argument
  * `trigger_direction` - *contract only* the direction for trigger orders, 'ascending' or 'descending'
  * `trigger_price` - The price at which a trigger order is triggered at

## Returns

\{:ok, Unified accepted paper order.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    price: %{
      description: "the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders (TS: Num)",
      kind: :value
    },
    time_in_force: %{description: "\"GTC\", \"IOC\", \"FOK\"", kind: :value},
    trigger_price: %{
      description: "The price at which a trigger order is triggered at",
      kind: :value
    },
    take_profit_price: %{
      description: "The price at which a take profit order is triggered at",
      kind: :value
    },
    stop_loss_price: %{
      description: "The price at which a stop loss order is triggered at",
      kind: :value
    },
    reduce_only: %{
      description: "true or false whether the order is reduce-only",
      kind: :value
    },
    post_only: %{
      description: "true or false whether the order is post-only",
      kind: :value
    },
    hedged: %{
      description: "*contracts only* true for hedged mode, false for one way mode, default is false",
      kind: :value
    },
    is_leverage: %{
      description: "*unified spot only* false then spot trading true then margin trading",
      kind: :value
    },
    mmp: %{description: "*option only* market maker protection", kind: :value},
    position_idx: %{
      description: "*contracts only* 0 for one-way mode, 1 buy side of hedged mode, 2 sell side of hedged mode",
      kind: :value
    },
    stop_loss: %{
      description: "*stopLoss object in params* containing the triggerPrice at which the attached stop loss order will be triggered",
      kind: :value
    },
    "stop_loss/trigger_price": %{
      description: "stop loss trigger price",
      kind: :value
    },
    stop_loss_limit_price: %{
      description: "The limit price for a stoploss order (only when used in OCO with takeProfitPrice)",
      kind: :value
    },
    take_profit: %{
      description: "*takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered",
      kind: :value
    },
    "take_profit/trigger_price": %{
      description: "take profit trigger price",
      kind: :value
    },
    take_profit_limit_price: %{
      description: "The limit price for a takeprofit order (only when used in OCO combination with stopLossPrice)",
      kind: :value
    },
    tpsl_mode: %{
      description: "*contract only* 'Full' or 'Partial'",
      kind: :value
    },
    trading_stop_endpoint: %{
      description: "whether to enforce using the tradingStop (https://bybit-exchange.github.io/docs/v5/position/trading-stop) endpoint, makes difference when submitting single tp/sl order",
      kind: :value
    },
    trailing_amount: %{
      description: "the quote amount to trail away from the current market price",
      kind: :value
    },
    trailing_trigger_price: %{
      description: "the price to trigger a trailing order, default uses the price argument",
      kind: :value
    },
    trigger_direction: %{
      description: "*contract only* the direction for trigger orders, 'ascending' or 'descending'",
      kind: :value
    }
  },
  params: %{
    type: %{description: "'market' or 'limit' (TS: OrderType)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to create an order in (TS: string)",
      kind: :value
    },
    amount: %{
      description: "how much of currency you want to trade in units of base currency (TS: number)",
      kind: :value
    },
    side: %{description: "'buy' or 'sell' (TS: OrderSide)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified accepted paper order.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `create_order_with_take_profit_and_stop_loss`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_orders`

Create multiple orders in a single request.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `orders` - list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params (TS: OrderRequest[]) (value)

## Returns

\{:ok, an [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    orders: %{
      description: "list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params (TS: OrderRequest[])",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `create_spot_order`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_spot_orders`

Create spot orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `orders` - orders (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `create_sub_account`

Create sub account.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `create_swap_order`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_trailing_amount_order`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_trailing_percent_order`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_twap_order`

Create twap order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to create an order in (TS: string) (value)
  * `side` - 'buy' or 'sell' (TS: OrderSide) (value)
  * `amount` - how much of currency you want to trade in units of base currency (TS: number) (value)
  * `duration` - the duration of the TWAP order in milliseconds (TS: number) (value)

## Options

  * `expires_after` - time in ms after which the twap order expires
  * `randomize` - whether to randomize the time intervals of the TWAP order slices (default is false, meaning equal intervals)
  * `reduce_only` - true or false whether the order is reduce-only
  * `vault_address` - the vault address for order

## Returns

\{:ok, an [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    reduce_only: %{
      description: "true or false whether the order is reduce-only",
      kind: :value
    },
    expires_after: %{
      description: "time in ms after which the twap order expires",
      kind: :value
    },
    randomize: %{
      description: "whether to randomize the time intervals of the TWAP order slices (default is false, meaning equal intervals)",
      kind: :value
    },
    vault_address: %{description: "the vault address for order", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to create an order in (TS: string)",
      kind: :value
    },
    amount: %{
      description: "how much of currency you want to trade in units of base currency (TS: number)",
      kind: :value
    },
    duration: %{
      description: "the duration of the TWAP order in milliseconds (TS: number)",
      kind: :value
    },
    side: %{description: "'buy' or 'sell' (TS: OrderSide)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `create_uta_order`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `create_uta_orders`

Create uta orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `orders` - orders (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `create_vault`

Create vault.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)
  * `amount` - amount (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `describe`

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

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

# `describe`

```elixir
@spec describe(module() | atom() | String.t()) :: [map()]
```

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

# `describe`

```elixir
@spec describe(module() | atom() | String.t(), atom()) :: map() | nil
```

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

# `doc_urls`

```elixir
@spec doc_urls(Bourse.Exchange.t()) :: Bourse.Exchange.doc_urls()
```

Returns the documentation URL doc-set (logo/www/doc/fees/api_management) for an exchange.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

Documentation/metadata URLs folded from the derived urls section, or an empty map (`map`)

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  returns: %{
    type: :map,
    description: "Documentation/metadata URLs folded from the derived urls section, or an empty map"
  }
}
```

# `edit_contract_order`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `edit_order`

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

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - cancel order id (TS: string) (value)
  * `symbol` - unified symbol of the market to create an order in (TS: string) (value)
  * `type` - 'market' or 'limit' (TS: OrderType) (value)
  * `side` - 'buy' or 'sell' (TS: OrderSide) (value)

## Options

  * `amount` - how much of currency you want to trade in units of base currency (TS: Num)
  * `client_order_id` - unique client order id
  * `price` - the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders (TS: Num)
  * `sl_trigger_by` - 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for stopLoss
  * `stop_loss` - *stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered
  * `stop_loss/trigger_price` - stop loss trigger price
  * `stop_loss_price` - The price that a stop loss order is triggered at
  * `take_profit` - *takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered
  * `take_profit/trigger_price` - take profit trigger price
  * `take_profit_price` - The price that a take profit order is triggered at
  * `tp_triggerby` - 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for takeProfit
  * `trigger_by` - 'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for triggerPrice
  * `trigger_price` - The price that a trigger order is triggered at

## Returns

\{:ok, an [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    amount: %{
      description: "how much of currency you want to trade in units of base currency (TS: Num)",
      kind: :value
    },
    client_order_id: %{description: "unique client order id", kind: :value},
    price: %{
      description: "the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders (TS: Num)",
      kind: :value
    },
    trigger_price: %{
      description: "The price that a trigger order is triggered at",
      kind: :value
    },
    take_profit_price: %{
      description: "The price that a take profit order is triggered at",
      kind: :value
    },
    stop_loss_price: %{
      description: "The price that a stop loss order is triggered at",
      kind: :value
    },
    stop_loss: %{
      description: "*stopLoss object in params* containing the triggerPrice that the attached stop loss order will be triggered",
      kind: :value
    },
    "stop_loss/trigger_price": %{
      description: "stop loss trigger price",
      kind: :value
    },
    take_profit: %{
      description: "*takeProfit object in params* containing the triggerPrice that the attached take profit order will be triggered",
      kind: :value
    },
    "take_profit/trigger_price": %{
      description: "take profit trigger price",
      kind: :value
    },
    sl_trigger_by: %{
      description: "'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for stopLoss",
      kind: :value
    },
    tp_triggerby: %{
      description: "'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for takeProfit",
      kind: :value
    },
    trigger_by: %{
      description: "'IndexPrice', 'MarkPrice' or 'LastPrice', default is 'LastPrice', required if no initial value for triggerPrice",
      kind: :value
    }
  },
  params: %{
    id: %{description: "cancel order id (TS: string)", kind: :value},
    type: %{description: "'market' or 'limit' (TS: OrderType)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to create an order in (TS: string)",
      kind: :value
    },
    side: %{description: "'buy' or 'sell' (TS: OrderSide)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `edit_orders`

Edit orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `orders` - list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params (TS: OrderRequest[]) (value)

## Returns

\{:ok, an [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    orders: %{
      description: "list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params (TS: OrderRequest[])",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `edit_spot_order`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `exchange`

```elixir
@spec exchange(
  String.t() | atom(),
  keyword()
) :: {:ok, Bourse.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, %Bourse.Exchange\{\} built from the owned spec (signing pattern, symbol patterns, error tables, etc.)\} or \{:error, reason\} (`result_tuple`)

## Errors

  * `:invalid_exchange`
  * `:missing_credentials`

```elixir
# 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, %Bourse.Exchange{} built from the owned spec (signing pattern, symbol patterns, error tables, etc.)} or {:error, reason}"
  }
}
```

# `exchange!`

```elixir
@spec exchange!(
  String.t() | atom(),
  keyword()
) :: Bourse.Exchange.t()
```

Bang variant of `exchange/2`. Raises on error.

# `fees`

```elixir
@spec fees(Bourse.Exchange.t()) :: Bourse.Exchange.fees()
```

Returns the static default fee schedule for an exchange.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

Static describe().fees defaults for trading and funding fees, or nil when absent (`map`)

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  returns: %{
    type: :map,
    description: "Static describe().fees defaults for trading and funding fees, or nil when absent"
  }
}
```

# `fetch_account`

Fetch account.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_account_facts`

Fetch provider-observed product access, account margin model, and position margin modes.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_account_positions`

Fetch account positions.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, a list of position structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Position[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of position structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Position[]>)"
  }
}
```

# `fetch_accounts`

Fetch accounts.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, a dictionary of [account structures]\{@link https://docs.ccxt.com/?id=account-structure\} indexed by the account type\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Account[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a dictionary of [account structures]{@link https://docs.ccxt.com/?id=account-structure} indexed by the account type} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Account[]>)"
  }
}
```

# `fetch_adl_rank`

Fetch adl rank.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, an [auto de leverage structure]\{@link https://docs.ccxt.com/?id=auto-de-leverage-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<ADL>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [auto de leverage structure]{@link https://docs.ccxt.com/?id=auto-de-leverage-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<ADL>)"
  }
}
```

# `fetch_all_greeks`

Fetch all greeks.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `symbols` - unified symbols of the markets to fetch greeks for, all markets are returned if not assigned (TS: Strings)

## Returns

\{:ok, a [greeks structure]\{@link https://docs.ccxt.com/?id=greeks-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Greeks[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "unified symbols of the markets to fetch greeks for, all markets are returned if not assigned (TS: Strings)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [greeks structure]{@link https://docs.ccxt.com/?id=greeks-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Greeks[]>)"
  }
}
```

# `fetch_balance`

Fetch account balance across all currencies.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `margin_mode` - 'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null
  * `portfolio_margin` - set to true if you would like to fetch the balance for a portfolio margin account
  * `sub_type` - 'linear' or 'inverse'
  * `symbols` - unified market symbols, only used in isolated margin mode
  * `type` - 'future', 'delivery', 'savings', 'funding', or 'spot' or 'papi'

## Returns

\{:ok, Unified Balance with the raw account retained in info.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Balances>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    type: %{
      description: "'future', 'delivery', 'savings', 'funding', or 'spot' or 'papi'",
      kind: :value
    },
    symbols: %{
      description: "unified market symbols, only used in isolated margin mode",
      kind: :value
    },
    sub_type: %{description: "'linear' or 'inverse'", kind: :value},
    margin_mode: %{
      description: "'cross' or 'isolated', for margin trading, uses this.options.defaultMarginMode if not passed, defaults to undefined/None/null",
      kind: :value
    },
    portfolio_margin: %{
      description: "set to true if you would like to fetch the balance for a portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified Balance with the raw account retained in info.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Balances>)"
  }
}
```

# `fetch_bids_asks`

Fetch bids asks.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `base_coin` - *option only* base coin, default is 'BTC'
  * `sub_type` - *contract only* 'linear', 'inverse'
  * `symbols` - unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned (TS: Strings)

## Returns

\{:ok, a dictionary of [ticker structures]\{@link https://docs.ccxt.com/?id=ticker-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Tickers>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned (TS: Strings)",
      kind: :value
    },
    sub_type: %{
      description: "*contract only* 'linear', 'inverse'",
      kind: :value
    },
    base_coin: %{
      description: "*option only* base coin, default is 'BTC'",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Tickers>)"
  }
}
```

# `fetch_borrow_interest`

Fetch borrow interest.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `code` - unified currency code (TS: Str)
  * `limit` - the maximum number of structures to retrieve (TS: Int)
  * `portfolio_margin` - set to true if you would like to fetch the borrow interest in a portfolio margin account
  * `since` - the earliest time in ms to fetch borrrow interest for (TS: Int)
  * `symbol` - unified market symbol when fetch interest in isolated markets (TS: Str)

## Returns

\{:ok, a list of [borrow interest structures]\{@link https://docs.ccxt.com/?id=borrow-interest-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<BorrowInterest[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    code: %{description: "unified currency code (TS: Str)", kind: :value},
    symbol: %{
      description: "unified market symbol when fetch interest in isolated markets (TS: Str)",
      kind: :value
    },
    limit: %{
      description: "the maximum number of structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch borrrow interest for (TS: Int)",
      kind: :value
    },
    portfolio_margin: %{
      description: "set to true if you would like to fetch the borrow interest in a portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [borrow interest structures]{@link https://docs.ccxt.com/?id=borrow-interest-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<BorrowInterest[]>)"
  }
}
```

# `fetch_borrow_rate_histories`

Fetch borrow rate histories.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_borrow_rate_history`

Fetch borrow rate history.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (TS: string) (value)

## Options

  * `limit` - limit (TS: Int)
  * `since` - since (TS: Int)

## Returns

\{:ok, an array of borrow rate structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<BorrowRate[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    limit: %{description: "limit (TS: Int)", kind: :value},
    since: %{description: "since (TS: Int)", kind: :value}
  },
  params: %{
    code: %{description: "code (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an array of borrow rate structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<BorrowRate[]>)"
  }
}
```

# `fetch_canceled_and_closed_orders`

Fetch canceled and closed orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum number of order structures to retrieve (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `portfolio_margin` - set to true if you would like to fetch orders in a portfolio margin account
  * `since` - the earliest time in ms to fetch orders for (TS: Int)
  * `symbol` - unified market symbol of the market the orders were made in (TS: Str)
  * `trigger` - set to true if you would like to fetch portfolio margin account trigger or conditional orders

## Returns

\{:ok, a list of [order structures]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{
      description: "unified market symbol of the market the orders were made in (TS: Str)",
      kind: :value
    },
    limit: %{
      description: "the maximum number of order structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch orders for (TS: Int)",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    trigger: %{
      description: "set to true if you would like to fetch portfolio margin account trigger or conditional orders",
      kind: :value
    },
    portfolio_margin: %{
      description: "set to true if you would like to fetch orders in a portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `fetch_canceled_and_closed_spot_orders`

Fetch canceled and closed spot orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_canceled_and_closed_swap_orders`

Fetch canceled and closed swap orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_canceled_orders`

Fetch canceled orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - max number of orders to return, default is undefined (TS: Int)
  * `order_filter` - 'Order' or 'StopOrder' or 'tpslOrder'
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `since` - timestamp in ms of the earliest order, default is undefined (TS: Int)
  * `stop` - alias for trigger
  * `sub_type` - market subType, ['linear', 'inverse']
  * `symbol` - unified market symbol of the market orders were made in (TS: Str)
  * `trigger` - true if trigger order
  * `type` - market type, ['swap', 'option', 'spot']
  * `until` - the latest time in ms to fetch entries for

## Returns

\{:ok, a list of [order structures]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    stop: %{description: "alias for trigger", kind: :value},
    type: %{
      description: "market type, ['swap', 'option', 'spot']",
      kind: :value
    },
    symbol: %{
      description: "unified market symbol of the market orders were made in (TS: Str)",
      kind: :value
    },
    until: %{
      description: "the latest time in ms to fetch entries for",
      kind: :value
    },
    limit: %{
      description: "max number of orders to return, default is undefined (TS: Int)",
      kind: :value
    },
    since: %{
      description: "timestamp in ms of the earliest order, default is undefined (TS: Int)",
      kind: :value
    },
    sub_type: %{
      description: "market subType, ['linear', 'inverse']",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    order_filter: %{
      description: "'Order' or 'StopOrder' or 'tpslOrder'",
      kind: :value
    },
    trigger: %{description: "true if trigger order", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `fetch_closed_contract_orders`

Fetch closed contract orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_closed_order`

Fetch closed order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - order id (TS: string) (value)

## Options

  * `order_filter` - 'Order' or 'StopOrder' or 'tpslOrder'
  * `stop` - alias for trigger
  * `sub_type` - market subType, ['linear', 'inverse']
  * `symbol` - unified symbol of the market the order was made in (TS: Str)
  * `trigger` - set to true for fetching a closed trigger order
  * `type` - market type, ['swap', 'option', 'spot']

## Returns

\{:ok, an [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    stop: %{description: "alias for trigger", kind: :value},
    type: %{
      description: "market type, ['swap', 'option', 'spot']",
      kind: :value
    },
    symbol: %{
      description: "unified symbol of the market the order was made in (TS: Str)",
      kind: :value
    },
    sub_type: %{
      description: "market subType, ['linear', 'inverse']",
      kind: :value
    },
    order_filter: %{
      description: "'Order' or 'StopOrder' or 'tpslOrder'",
      kind: :value
    },
    trigger: %{
      description: "set to true for fetching a closed trigger order",
      kind: :value
    }
  },
  params: %{
    id: %{description: "order id (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `fetch_closed_orders`

Fetch completed (filled) orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum number of order structures to retrieve (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `portfolio_margin` - set to true if you would like to fetch orders in a portfolio margin account
  * `since` - the earliest time in ms to fetch orders for (TS: Int)
  * `symbol` - unified market symbol of the market orders were made in (TS: Str)
  * `trigger` - set to true if you would like to fetch portfolio margin account trigger or conditional orders

## Returns

\{:ok, Unified closed paper orders.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{
      description: "unified market symbol of the market orders were made in (TS: Str)",
      kind: :value
    },
    limit: %{
      description: "the maximum number of order structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch orders for (TS: Int)",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    trigger: %{
      description: "set to true if you would like to fetch portfolio margin account trigger or conditional orders",
      kind: :value
    },
    portfolio_margin: %{
      description: "set to true if you would like to fetch orders in a portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified closed paper orders.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `fetch_closed_spot_orders`

Fetch closed spot orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_balance`

Fetch contract balance.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_deposit_address`

Fetch contract deposit address.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_deposits`

Fetch contract deposits.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_markets`

Fetch contract markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_ohlcv`

Fetch contract ohlcv.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)
  * `timeframe` - timeframe (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `fetch_contract_order`

Fetch contract order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_orders`

Fetch contract orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_orders_by_status`

Fetch contract orders by status.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_tickers`

Fetch contract tickers.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_contract_withdrawals`

Fetch contract withdrawals.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_convert_currencies`

Fetch convert currencies.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, an associative dictionary of currencies\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Currencies>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an associative dictionary of currencies} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Currencies>)"
  }
}
```

# `fetch_convert_quote`

Fetch convert quote.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `from_code` - from code (TS: string) (value)
  * `to_code` - to code (TS: string) (value)
  * `amount` - how much you want to trade in units of the from currency (TS: Num) (value)

## Options

  * `wallet_type` - either 'SPOT' or 'FUNDING', the default is 'SPOT'

## Returns

\{:ok, a [conversion structure]\{@link https://docs.ccxt.com/?id=conversion-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Conversion>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    wallet_type: %{
      description: "either 'SPOT' or 'FUNDING', the default is 'SPOT'",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{
      description: "how much you want to trade in units of the from currency (TS: Num)",
      kind: :value
    },
    from_code: %{description: "from code (TS: string)", kind: :value},
    to_code: %{description: "to code (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [conversion structure]{@link https://docs.ccxt.com/?id=conversion-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Conversion>)"
  }
}
```

# `fetch_convert_trade`

Fetch convert trade.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - the id of the trade that you want to fetch (TS: string) (value)

## Options

  * `code` - the unified currency code of the conversion trade (TS: Str)

## Returns

\{:ok, a [conversion structure]\{@link https://docs.ccxt.com/?id=conversion-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Conversion>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    code: %{
      description: "the unified currency code of the conversion trade (TS: Str)",
      kind: :value
    }
  },
  params: %{
    id: %{
      description: "the id of the trade that you want to fetch (TS: string)",
      kind: :value
    },
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [conversion structure]{@link https://docs.ccxt.com/?id=conversion-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Conversion>)"
  }
}
```

# `fetch_convert_trade_history`

Fetch convert trade history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `code` - the unified currency code (TS: Str)
  * `limit` - the maximum number of conversion structures to retrieve (TS: Int)
  * `since` - the earliest time in ms to fetch conversions for (TS: Int)
  * `until` - timestamp in ms of the latest conversion to fetch

## Returns

\{:ok, a list of [conversion structures]\{@link https://docs.ccxt.com/?id=conversion-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Conversion[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    code: %{description: "the unified currency code (TS: Str)", kind: :value},
    until: %{
      description: "timestamp in ms of the latest conversion to fetch",
      kind: :value
    },
    limit: %{
      description: "the maximum number of conversion structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch conversions for (TS: Int)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [conversion structures]{@link https://docs.ccxt.com/?id=conversion-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Conversion[]>)"
  }
}
```

# `fetch_cross_borrow_rate`

Fetch cross borrow rate.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - unified currency code (TS: string) (value)

## Returns

\{:ok, a [borrow rate structure]\{@link https://docs.ccxt.com/?id=borrow-rate-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<CrossBorrowRate>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    code: %{description: "unified currency code (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [borrow rate structure]{@link https://docs.ccxt.com/?id=borrow-rate-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<CrossBorrowRate>)"
  }
}
```

# `fetch_cross_borrow_rates`

Fetch cross borrow rates.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, a list of [borrow rate structures]\{@link https://docs.ccxt.com/?id=borrow-rate-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<CrossBorrowRates>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [borrow rate structures]{@link https://docs.ccxt.com/?id=borrow-rate-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<CrossBorrowRates>)"
  }
}
```

# `fetch_currencies`

Fetch all available currencies and their details.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, an associative dictionary of currencies\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Currencies>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an associative dictionary of currencies} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Currencies>)"
  }
}
```

# `fetch_currency`

Fetch currency.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_currency_by_id`

Fetch currency by id.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_deposit`

Fetch deposit.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

\{:ok, a transaction structure\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Transaction>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a transaction structure} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Transaction>)"
  }
}
```

# `fetch_deposit_address`

Fetch a deposit address for a currency.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - unified currency code (TS: string) (value)

## Options

  * `network` - network for fetch deposit address

## Returns

\{:ok, an [address structure]\{@link https://docs.ccxt.com/?id=address-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<DepositAddress>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    network: %{description: "network for fetch deposit address", kind: :value}
  },
  params: %{
    code: %{description: "unified currency code (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [address structure]{@link https://docs.ccxt.com/?id=address-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<DepositAddress>)"
  }
}
```

# `fetch_deposit_addresses`

Fetch deposit addresses.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_deposit_addresses_by_network`

Fetch deposit addresses by network.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - unified currency code of the currency for the deposit address (TS: string) (value)

## Returns

\{:ok, a dictionary of [address structures]\{@link https://docs.ccxt.com/?id=address-structure\} indexed by the network\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<DepositAddress[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    code: %{
      description: "unified currency code of the currency for the deposit address (TS: string)",
      kind: :value
    },
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a dictionary of [address structures]{@link https://docs.ccxt.com/?id=address-structure} indexed by the network} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<DepositAddress[]>)"
  }
}
```

# `fetch_deposit_method_id`

Fetch deposit method id.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_deposit_method_ids`

Fetch deposit method ids.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_deposit_methods`

Fetch deposit methods.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_deposit_withdraw_fee`

Fetch deposit withdraw fee.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_deposit_withdraw_fees`

Fetch deposit withdraw fees.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_deposits`

Fetch deposit history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `code` - unified currency code (TS: Str)
  * `fiat` - if true, only fiat deposits will be returned
  * `limit` - the maximum number of deposits structures to retrieve (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `since` - the earliest time in ms to fetch deposits for (TS: Int)
  * `until` - the latest time in ms to fetch entries for

## Returns

\{:ok, a list of [transaction structures]\{@link https://docs.ccxt.com/?id=transaction-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Transaction[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    code: %{description: "unified currency code (TS: Str)", kind: :value},
    until: %{
      description: "the latest time in ms to fetch entries for",
      kind: :value
    },
    limit: %{
      description: "the maximum number of deposits structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch deposits for (TS: Int)",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    fiat: %{
      description: "if true, only fiat deposits will be returned",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Transaction[]>)"
  }
}
```

# `fetch_deposits_withdrawals`

Fetch deposits withdrawals.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_derivatives_market_leverage_tiers`

Fetch derivatives market leverage tiers.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (TS: string) (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_derivatives_open_interest_history`

Fetch derivatives open interest history.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

\{:ok, a list of open interest structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OpenInterest[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of open interest structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OpenInterest[]>)"
  }
}
```

# `fetch_financial_balance`

Fetch financial balance.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_funding_history`

Fetch funding history.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: Str) (value)

## Options

  * `limit` - the maximum number of funding history structures to retrieve (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `since` - the earliest time in ms to fetch funding history for (TS: Int)

## Returns

\{:ok, a [funding history structure]\{@link https://docs.ccxt.com/?id=funding-history-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<FundingHistory[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    limit: %{
      description: "the maximum number of funding history structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch funding history for (TS: Int)",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: Str)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [funding history structure]{@link https://docs.ccxt.com/?id=funding-history-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<FundingHistory[]>)"
  }
}
```

# `fetch_funding_interval`

Fetch funding interval.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)

## Returns

\{:ok, a [funding rate structure]\{@link https://docs.ccxt.com/?id=funding-rate-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<FundingRate>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<FundingRate>)"
  }
}
```

# `fetch_funding_intervals`

Fetch funding intervals.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `sub_type` - "linear" or "inverse"
  * `symbols` - list of unified market symbols (TS: Strings)

## Returns

\{:ok, a list of [funding rate structures]\{@link https://docs.ccxt.com/?id=funding-rate-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<FundingRates>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "list of unified market symbols (TS: Strings)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<FundingRates>)"
  }
}
```

# `fetch_funding_limits`

Fetch funding limits.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_funding_rate`

Fetch the current funding rate for a perpetual swap.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)

## Returns

\{:ok, a [funding rate structure]\{@link https://docs.ccxt.com/?id=funding-rate-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<FundingRate>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<FundingRate>)"
  }
}
```

# `fetch_funding_rate_history`

Fetch funding rate history.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (TS: string) (value)

## Options

  * `limit` - limit (TS: Int)
  * `since` - since (TS: Int)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    limit: %{description: "limit (TS: Int)", kind: :value},
    since: %{description: "since (TS: Int)", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `fetch_funding_rates`

Fetch funding rates for all perpetual swaps.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `sub_type` - "linear" or "inverse"
  * `symbols` - list of unified market symbols (TS: Strings)

## Returns

\{:ok, a list of [funding rate structures]\{@link https://docs.ccxt.com/?id=funding-rates-structure\}, indexed by market symbols\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<FundingRates>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "list of unified market symbols (TS: Strings)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rates-structure}, indexed by market symbols} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<FundingRates>)"
  }
}
```

# `fetch_future_markets`

Fetch future markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_greeks`

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

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to fetch greeks for (TS: string) (value)

## Returns

\{:ok, a [greeks structure]\{@link https://docs.ccxt.com/?id=greeks-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Greeks>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to fetch greeks for (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [greeks structure]{@link https://docs.ccxt.com/?id=greeks-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Greeks>)"
  }
}
```

# `fetch_inverse_swap_markets`

Fetch inverse swap markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_isolated_borrow_rate`

Fetch isolated borrow rate.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)

## Options

  * `vip_level` - user's current specific margin data will be returned if viplevel is omitted

## Returns

\{:ok, an [isolated borrow rate structure]\{@link https://docs.ccxt.com/?id=isolated-borrow-rate-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<IsolatedBorrowRate>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    vip_level: %{
      description: "user's current specific margin data will be returned if viplevel is omitted",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [isolated borrow rate structure]{@link https://docs.ccxt.com/?id=isolated-borrow-rate-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<IsolatedBorrowRate>)"
  }
}
```

# `fetch_isolated_borrow_rates`

Fetch isolated borrow rates.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `symbol` - unified market symbol  EXCHANGE SPECIFIC PARAMETERS
  * `vip_level` - user's current specific margin data will be returned if viplevel is omitted

## Returns

\{:ok, a [borrow rate structure]\{@link https://docs.ccxt.com/?id=borrow-rate-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<IsolatedBorrowRates>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{
      description: "unified market symbol  EXCHANGE SPECIFIC PARAMETERS",
      kind: :value
    },
    vip_level: %{
      description: "user's current specific margin data will be returned if viplevel is omitted",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [borrow rate structure]{@link https://docs.ccxt.com/?id=borrow-rate-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<IsolatedBorrowRates>)"
  }
}
```

# `fetch_l2_order_book`

Fetch l2 order book.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_l3_order_book`

Fetch l3 order book.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_last_prices`

Fetch last prices.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, a list of last price structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<LastPrice[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of last price structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<LastPrice[]>)"
  }
}
```

# `fetch_ledger`

Fetch the account ledger. Entry types use registered unified values (trade, fee, deposit, withdrawal, transfer, funding_fee, realized_pnl, liquidation, settlement, interest, rebate, commission, cashback, referral, conversion, bonus) or a venue-faithful snake_case label for mapped events outside the registry. Scopes with enum passthrough (base maps and routed maps alike) emit the provider's raw literal for any type outside their mapped set; the venue literal is always retained in info.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `code` - unified currency code (TS: Str)
  * `limit` - max number of ledger entries to return (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `portfolio_margin` - set to true if you would like to fetch the ledger for a portfolio margin account
  * `since` - timestamp in ms of the earliest ledger entry (TS: Int)
  * `sub_type` - "linear" or "inverse"
  * `until` - timestamp in ms of the latest ledger entry

## Returns

\{:ok, a [ledger structure]\{@link https://docs.ccxt.com/?id=ledger-entry-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<LedgerEntry[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    code: %{description: "unified currency code (TS: Str)", kind: :value},
    until: %{
      description: "timestamp in ms of the latest ledger entry",
      kind: :value
    },
    limit: %{
      description: "max number of ledger entries to return (TS: Int)",
      kind: :value
    },
    since: %{
      description: "timestamp in ms of the earliest ledger entry (TS: Int)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value},
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    portfolio_margin: %{
      description: "set to true if you would like to fetch the ledger for a portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<LedgerEntry[]>)"
  }
}
```

# `fetch_ledger_by_entries`

Fetch ledger by entries.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_ledger_entries_by_ids`

Fetch ledger entries by ids.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `ids` - ids (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_ledger_entry`

Fetch ledger entry.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - the identification number of the ledger entry (TS: string) (value)

## Options

  * `code` - unified currency code (TS: Str)

## Returns

\{:ok, a [ledger structure]\{@link https://docs.ccxt.com/?id=ledger-entry-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<LedgerEntry>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{code: %{description: "unified currency code (TS: Str)", kind: :value}},
  params: %{
    id: %{
      description: "the identification number of the ledger entry (TS: string)",
      kind: :value
    },
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [ledger structure]{@link https://docs.ccxt.com/?id=ledger-entry-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<LedgerEntry>)"
  }
}
```

# `fetch_leverage`

Fetch current leverage setting for a symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)

## Returns

\{:ok, a [leverage structure]\{@link https://docs.ccxt.com/?id=leverage-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Leverage>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [leverage structure]{@link https://docs.ccxt.com/?id=leverage-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Leverage>)"
  }
}
```

# `fetch_leverage_tiers`

Fetch leverage tiers.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `portfolio_margin` - set to true if you would like to fetch the leverage tiers for a portfolio margin account
  * `sub_type` - "linear" or "inverse"
  * `symbols` - list of unified market symbols (TS: Strings)

## Returns

\{:ok, a dictionary of [leverage tiers structures]\{@link https://docs.ccxt.com/?id=leverage-tiers-structure\}, indexed by market symbols\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<LeverageTiers>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "list of unified market symbols (TS: Strings)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value},
    portfolio_margin: %{
      description: "set to true if you would like to fetch the leverage tiers for a portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/?id=leverage-tiers-structure}, indexed by market symbols} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<LeverageTiers>)"
  }
}
```

# `fetch_leverages`

Fetch leverages.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `sub_type` - "linear" or "inverse"
  * `symbols` - a list of unified market symbols (TS: Strings)

## Returns

\{:ok, a list of [leverage structures]\{@link https://docs.ccxt.com/?id=leverage-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Leverages>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "a list of unified market symbols (TS: Strings)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [leverage structures]{@link https://docs.ccxt.com/?id=leverage-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Leverages>)"
  }
}
```

# `fetch_liquidations`

Fetch recent liquidation events for a symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_long_short_ratio_history`

Fetch long short ratio history.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to fetch the long short ratio for (TS: Str) (value)

## Options

  * `limit` - the maximum number of long short ratio structures to retrieve (TS: Int)
  * `since` - the earliest time in ms to fetch ratios for (TS: Int)
  * `timeframe` - the period for the ratio, default is 24 hours (TS: Str)
  * `until` - timestamp in ms of the latest ratio to fetch

## Returns

\{:ok, an array of [long short ratio structures]\{@link https://docs.ccxt.com/?id=long-short-ratio-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<LongShortRatio[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    until: %{
      description: "timestamp in ms of the latest ratio to fetch",
      kind: :value
    },
    limit: %{
      description: "the maximum number of long short ratio structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch ratios for (TS: Int)",
      kind: :value
    },
    timeframe: %{
      description: "the period for the ratio, default is 24 hours (TS: Str)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to fetch the long short ratio for (TS: Str)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an array of [long short ratio structures]{@link https://docs.ccxt.com/?id=long-short-ratio-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<LongShortRatio[]>)"
  }
}
```

# `fetch_margin_adjustment_history`

Fetch margin adjustment history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum amount of changes to fetch (TS: Num)
  * `since` - timestamp in ms of the earliest change to fetch (TS: Num)
  * `symbol` - unified market symbol (TS: Str)
  * `type` - "add" or "reduce" (TS: Str)
  * `until` - timestamp in ms of the latest change to fetch

## Returns

\{:ok, a list of [margin structures]\{@link https://docs.ccxt.com/?id=margin-loan-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<MarginModification[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    type: %{description: "\"add\" or \"reduce\" (TS: Str)", kind: :value},
    symbol: %{description: "unified market symbol (TS: Str)", kind: :value},
    until: %{
      description: "timestamp in ms of the latest change to fetch",
      kind: :value
    },
    limit: %{
      description: "the maximum amount of changes to fetch (TS: Num)",
      kind: :value
    },
    since: %{
      description: "timestamp in ms of the earliest change to fetch (TS: Num)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [margin structures]{@link https://docs.ccxt.com/?id=margin-loan-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<MarginModification[]>)"
  }
}
```

# `fetch_margin_balance`

Fetch margin balance.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_margin_mode`

Fetch margin mode.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market the order was made in (TS: string) (value)

## Options

  * `sub_type` - "linear" or "inverse"

## Returns

\{:ok, a [margin mode structure]\{@link https://docs.ccxt.com/?id=margin-mode-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<MarginMode>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}},
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market the order was made in (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [margin mode structure]{@link https://docs.ccxt.com/?id=margin-mode-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<MarginMode>)"
  }
}
```

# `fetch_margin_modes`

Fetch margin modes.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `sub_type` - "linear" or "inverse"
  * `symbols` - unified market symbols (TS: Strings)

## Returns

\{:ok, a list of [margin mode structures]\{@link https://docs.ccxt.com/?id=margin-mode-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<MarginModes>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "unified market symbols (TS: Strings)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [margin mode structures]{@link https://docs.ccxt.com/?id=margin-mode-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<MarginModes>)"
  }
}
```

# `fetch_mark_price`

Fetch the mark price for a derivative symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to fetch the ticker for (TS: string) (value)

## Options

  * `sub_type` - "linear" or "inverse"

## Returns

\{:ok, a dictionary of [ticker structures]\{@link https://docs.ccxt.com/?id=ticker-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Ticker>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}},
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to fetch the ticker for (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Ticker>)"
  }
}
```

# `fetch_mark_prices`

Fetch mark prices.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `sub_type` - "linear" or "inverse"
  * `symbols` - unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned (TS: Strings)

## Returns

\{:ok, a dictionary of [ticker structures]\{@link https://docs.ccxt.com/?id=ticker-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Tickers>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned (TS: Strings)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Tickers>)"
  }
}
```

# `fetch_market`

Fetch market.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_market_by_id`

Fetch market by id.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_market_leverage_tiers`

Fetch market leverage tiers.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)

## Returns

\{:ok, a [leverage tiers structure]\{@link https://docs.ccxt.com/?id=leverage-tiers-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<LeverageTier[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [leverage tiers structure]{@link https://docs.ccxt.com/?id=leverage-tiers-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<LeverageTier[]>)"
  }
}
```

# `fetch_markets`

Fetch all available markets and trading pairs.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, Unified equity assets.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Market[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified equity assets.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Market[]>)"
  }
}
```

# `fetch_markets_by_type`

Fetch markets by type.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `type` - type (value)

## Returns

\{:ok, a list of market structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Market[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    type: %{description: "type", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of market structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Market[]>)"
  }
}
```

# `fetch_markets_by_type_and_sub_type`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `fetch_my_buys`

Fetch my buys.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_my_contract_trades`

Fetch my contract trades.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_my_dust_trades`

Fetch my dust trades.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, a list of trade structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Trade[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of trade structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Trade[]>)"
  }
}
```

# `fetch_my_liquidations`

Fetch my liquidations.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum number of liquidation structures to retrieve (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `since` - the earliest time in ms to fetch liquidations for (TS: Int)
  * `sub_type` - market subType, ['linear', 'inverse']
  * `symbol` - unified CCXT market symbol (TS: Str)
  * `type` - market type, ['swap', 'option', 'spot']

## Returns

\{:ok, an array of [liquidation structures]\{@link https://docs.ccxt.com/?id=liquidation-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Liquidation[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    type: %{
      description: "market type, ['swap', 'option', 'spot']",
      kind: :value
    },
    symbol: %{description: "unified CCXT market symbol (TS: Str)", kind: :value},
    limit: %{
      description: "the maximum number of liquidation structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch liquidations for (TS: Int)",
      kind: :value
    },
    sub_type: %{
      description: "market subType, ['linear', 'inverse']",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an array of [liquidation structures]{@link https://docs.ccxt.com/?id=liquidation-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Liquidation[]>)"
  }
}
```

# `fetch_my_sells`

Fetch my sells.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_my_settlement_history`

Fetch my settlement history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_my_spot_trades`

Fetch my spot trades.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_my_trades`

Fetch the authenticated user's trade history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum number of trades structures to retrieve (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `since` - the earliest time in ms to fetch trades for (TS: Int)
  * `sub_type` - market subType, ['linear', 'inverse']
  * `symbol` - unified market symbol (TS: Str)
  * `type` - market type, ['swap', 'option', 'spot']

## Returns

\{:ok, Unified fills from GET /v2/account/activities/FILL.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Trade[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    type: %{
      description: "market type, ['swap', 'option', 'spot']",
      kind: :value
    },
    symbol: %{description: "unified market symbol (TS: Str)", kind: :value},
    limit: %{
      description: "the maximum number of trades structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch trades for (TS: Int)",
      kind: :value
    },
    sub_type: %{
      description: "market subType, ['linear', 'inverse']",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified fills from GET /v2/account/activities/FILL.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Trade[]>)"
  }
}
```

# `fetch_my_uta_trades`

Fetch my uta trades.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_network_deposit_address`

Fetch network deposit address.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_ohlcv`

Fetch OHLCV candlestick data for a symbol and timeframe.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to fetch OHLCV data for (TS: string) (value)
  * `timeframe` - the length of time each candle represents (TS: string) (default: `"'1m'"`, value)

## Options

  * `limit` - the maximum amount of candles to fetch (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `price` - "mark" or "index" for mark price and index price candles
  * `since` - timestamp in ms of the earliest candle to fetch (TS: Int)
  * `until` - timestamp in ms of the latest candle to fetch

## Returns

\{:ok, A list of candles ordered as timestamp, open, high, low, close, volume\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OHLCV[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    until: %{
      description: "timestamp in ms of the latest candle to fetch",
      kind: :value
    },
    limit: %{
      description: "the maximum amount of candles to fetch (TS: Int)",
      kind: :value
    },
    since: %{
      description: "timestamp in ms of the earliest candle to fetch (TS: Int)",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    price: %{
      description: "\"mark\" or \"index\" for mark price and index price candles",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to fetch OHLCV data for (TS: string)",
      kind: :value
    },
    timeframe: %{
      default: "'1m'",
      description: "the length of time each candle represents (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, A list of candles ordered as timestamp, open, high, low, close, volume} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OHLCV[]>)"
  }
}
```

# `fetch_open_interest`

Fetch open interest for a perpetual or futures symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified CCXT market symbol (TS: string) (value)

## Returns

\{:ok, an [open interest structure]\{@link https://docs.ccxt.com/?id=open-interest-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OpenInterest>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified CCXT market symbol (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [open interest structure]{@link https://docs.ccxt.com/?id=open-interest-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OpenInterest>)"
  }
}
```

# `fetch_open_interest_history`

Fetch open interest history.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_open_interests`

Fetch open interests.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `inst_family` - Instrument family, Applicable to FUTURES/SWAP/OPTION, if instType is 'OPTION', either uly or instFamily is required
  * `inst_type` - Instrument type, options: 'SWAP', 'FUTURES', 'OPTION', default to 'SWAP'
  * `symbols` - Unified CCXT market symbols (TS: Strings)
  * `uly` - Underlying, Applicable to FUTURES/SWAP/OPTION, if instType is 'OPTION', either uly or instFamily is required

## Returns

\{:ok, an dictionary of [open interest structures]\{@link https://docs.ccxt.com/?id=open-interest-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OpenInterests>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "Unified CCXT market symbols (TS: Strings)",
      kind: :value
    },
    inst_type: %{
      description: "Instrument type, options: 'SWAP', 'FUTURES', 'OPTION', default to 'SWAP'",
      kind: :value
    },
    inst_family: %{
      description: "Instrument family, Applicable to FUTURES/SWAP/OPTION, if instType is 'OPTION', either uly or instFamily is required",
      kind: :value
    },
    uly: %{
      description: "Underlying, Applicable to FUTURES/SWAP/OPTION, if instType is 'OPTION', either uly or instFamily is required",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an dictionary of [open interest structures]{@link https://docs.ccxt.com/?id=open-interest-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OpenInterests>)"
  }
}
```

# `fetch_open_order`

Fetch open order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - order id (TS: string) (value)

## Options

  * `base_coin` - Base coin. Supports linear, inverse & option
  * `order_filter` - 'Order' or 'StopOrder' or 'tpslOrder'
  * `settle_coin` - Settle coin. Supports linear, inverse & option
  * `stop` - alias for trigger
  * `sub_type` - market subType, ['linear', 'inverse']
  * `symbol` - unified symbol of the market the order was made in (TS: Str)
  * `trigger` - set to true for fetching an open trigger order
  * `type` - market type, ['swap', 'option', 'spot']

## Returns

\{:ok, an [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    stop: %{description: "alias for trigger", kind: :value},
    type: %{
      description: "market type, ['swap', 'option', 'spot']",
      kind: :value
    },
    symbol: %{
      description: "unified symbol of the market the order was made in (TS: Str)",
      kind: :value
    },
    sub_type: %{
      description: "market subType, ['linear', 'inverse']",
      kind: :value
    },
    base_coin: %{
      description: "Base coin. Supports linear, inverse & option",
      kind: :value
    },
    order_filter: %{
      description: "'Order' or 'StopOrder' or 'tpslOrder'",
      kind: :value
    },
    trigger: %{
      description: "set to true for fetching an open trigger order",
      kind: :value
    },
    settle_coin: %{
      description: "Settle coin. Supports linear, inverse & option",
      kind: :value
    }
  },
  params: %{
    id: %{description: "order id (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `fetch_open_order_lists`

Fetch currently open order groups.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, a list of order-group structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OrderList[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of order-group structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OrderList[]>)"
  }
}
```

# `fetch_open_orders`

Fetch all currently open orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum number of open orders structures to retrieve (TS: Int)
  * `margin_mode` - 'cross' or 'isolated', for spot margin trading
  * `portfolio_margin` - set to true if you would like to fetch open orders in the portfolio margin account
  * `since` - the earliest time in ms to fetch open orders for (TS: Int)
  * `sub_type` - "linear" or "inverse"
  * `symbol` - unified market symbol (TS: Str)
  * `trigger` - set to true if you would like to fetch portfolio margin account conditional orders

## Returns

\{:ok, Unified open paper orders.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{description: "unified market symbol (TS: Str)", kind: :value},
    limit: %{
      description: "the maximum number of open orders structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch open orders for (TS: Int)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value},
    margin_mode: %{
      description: "'cross' or 'isolated', for spot margin trading",
      kind: :value
    },
    trigger: %{
      description: "set to true if you would like to fetch portfolio margin account conditional orders",
      kind: :value
    },
    portfolio_margin: %{
      description: "set to true if you would like to fetch open orders in the portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified open paper orders.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `fetch_open_spot_orders`

Fetch open spot orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_open_swap_orders`

Fetch open swap orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_option`

Fetch option.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)

## Returns

\{:ok, an [option chain structure]\{@link https://docs.ccxt.com/?id=option-chain-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Option>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [option chain structure]{@link https://docs.ccxt.com/?id=option-chain-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Option>)"
  }
}
```

# `fetch_option_chain`

Fetch the full options chain for an underlying asset.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

\{:ok, a list of [option chain structures]\{@link https://docs.ccxt.com/?id=option-chain-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OptionChain>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [option chain structures]{@link https://docs.ccxt.com/?id=option-chain-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OptionChain>)"
  }
}
```

# `fetch_option_markets`

Fetch option markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_option_ohlcv`

Fetch option ohlcv.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)
  * `timeframe` - timeframe (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `fetch_option_positions`

Fetch option positions.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, a list of position structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Position[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of position structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Position[]>)"
  }
}
```

# `fetch_option_underlyings`

Fetch option underlyings.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_order`

Fetch details of a specific order by ID.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - the order id (TS: string) (value)

## Options

  * `acknowledged` - to suppress the warning, set to true
  * `symbol` - unified symbol of the market the order was made in (TS: Str)

## Returns

\{:ok, Unified paper order.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{
      description: "unified symbol of the market the order was made in (TS: Str)",
      kind: :value
    },
    acknowledged: %{
      description: "to suppress the warning, set to true",
      kind: :value
    }
  },
  params: %{
    id: %{description: "the order id (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified paper order.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `fetch_order_book`

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

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to fetch the order book for (TS: string) (value)

## Options

  * `limit` - the maximum amount of order book entries to return (TS: Int)
  * `rpi` - *future only* set to true to use the RPI endpoint

## Returns

\{:ok, A dictionary of [order book structures]\{@link https://docs.ccxt.com/?id=order-book-structure\} indexed by market symbols\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OrderBook>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    limit: %{
      description: "the maximum amount of order book entries to return (TS: Int)",
      kind: :value
    },
    rpi: %{
      description: "*future only* set to true to use the RPI endpoint",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to fetch the order book for (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OrderBook>)"
  }
}
```

# `fetch_order_books`

Fetch order books.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_order_classic`

Fetch order classic.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - the order id (TS: string) (value)

## Options

  * `symbol` - unified symbol of the market the order was made in (TS: Str)

## Returns

\{:ok, An [order structure]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{
      description: "unified symbol of the market the order was made in (TS: Str)",
      kind: :value
    }
  },
  params: %{
    id: %{description: "the order id (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, An [order structure]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order>)"
  }
}
```

# `fetch_order_list`

Fetch a specific order group by its exchange list ID.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - exchange order-list identifier (TS: Int) (value)

## Returns

\{:ok, an order-group structure\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OrderList>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    id: %{description: "exchange order-list identifier (TS: Int)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an order-group structure} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OrderList>)"
  }
}
```

# `fetch_order_lists`

Fetch historical order groups.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum number of order-group structures to retrieve (TS: Int)
  * `since` - the earliest time in ms to fetch order groups for (TS: Int)
  * `until` - the latest time in ms to fetch order groups for

## Returns

\{:ok, a list of order-group structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<OrderList[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    until: %{
      description: "the latest time in ms to fetch order groups for",
      kind: :value
    },
    limit: %{
      description: "the maximum number of order-group structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch order groups for (TS: Int)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of order-group structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<OrderList[]>)"
  }
}
```

# `fetch_order_status`

Fetch order status.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_order_trades`

Fetch order trades.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - order id (TS: string) (value)

## Options

  * `limit` - the maximum number of trades to retrieve (TS: Int)
  * `since` - the earliest time in ms to fetch trades for (TS: Int)
  * `symbol` - unified market symbol (TS: Str)

## Returns

\{:ok, a list of [trade structures]\{@link https://docs.ccxt.com/?id=trade-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Trade[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{description: "unified market symbol (TS: Str)", kind: :value},
    limit: %{
      description: "the maximum number of trades to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch trades for (TS: Int)",
      kind: :value
    }
  },
  params: %{
    id: %{description: "order id (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Trade[]>)"
  }
}
```

# `fetch_orders`

Fetch a list of orders, optionally filtered by symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum number of order structures to retrieve (TS: Int)
  * `margin_mode` - 'cross' or 'isolated', for spot margin trading
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `portfolio_margin` - set to true if you would like to fetch orders in a portfolio margin account
  * `since` - the earliest time in ms to fetch orders for (TS: Int)
  * `symbol` - unified market symbol of the market orders were made in (TS: Str)
  * `trigger` - set to true if you would like to fetch portfolio margin account trigger or conditional orders
  * `until` - the latest time in ms to fetch orders for

## Returns

\{:ok, Unified paper orders.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbol: %{
      description: "unified market symbol of the market orders were made in (TS: Str)",
      kind: :value
    },
    until: %{
      description: "the latest time in ms to fetch orders for",
      kind: :value
    },
    limit: %{
      description: "the maximum number of order structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch orders for (TS: Int)",
      kind: :value
    },
    margin_mode: %{
      description: "'cross' or 'isolated', for spot margin trading",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    trigger: %{
      description: "set to true if you would like to fetch portfolio margin account trigger or conditional orders",
      kind: :value
    },
    portfolio_margin: %{
      description: "set to true if you would like to fetch orders in a portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified paper orders.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `fetch_orders_by_ids`

Fetch orders by ids.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `ids` - ids (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_orders_by_state`

Fetch orders by state.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `state` - state (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_orders_by_status`

Fetch orders by status.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `status` - status (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_orders_by_type`

Fetch orders by type.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `type` - type (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_orders_classic`

Fetch orders classic.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum number of order structures to retrieve (TS: Int)
  * `order_filter` - 'Order' or 'StopOrder' or 'tpslOrder'
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `since` - the earliest time in ms to fetch orders for (TS: Int)
  * `stop` - alias for trigger
  * `sub_type` - market subType, ['linear', 'inverse']
  * `symbol` - unified market symbol of the market orders were made in (TS: Str)
  * `trigger` - true if trigger order
  * `type` - market type, ['swap', 'option', 'spot']
  * `until` - the latest time in ms to fetch entries for

## Returns

\{:ok, a list of [order structures]\{@link https://docs.ccxt.com/?id=order-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Order[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    stop: %{description: "alias for trigger", kind: :value},
    type: %{
      description: "market type, ['swap', 'option', 'spot']",
      kind: :value
    },
    symbol: %{
      description: "unified market symbol of the market orders were made in (TS: Str)",
      kind: :value
    },
    until: %{
      description: "the latest time in ms to fetch entries for",
      kind: :value
    },
    limit: %{
      description: "the maximum number of order structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch orders for (TS: Int)",
      kind: :value
    },
    sub_type: %{
      description: "market subType, ['linear', 'inverse']",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    order_filter: %{
      description: "'Order' or 'StopOrder' or 'tpslOrder'",
      kind: :value
    },
    trigger: %{description: "true if trigger order", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Order[]>)"
  }
}
```

# `fetch_payment_methods`

Fetch payment methods.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_portfolio_details`

Fetch portfolio details.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `portfolio_id` - portfolio id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_portfolios`

Fetch portfolios.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_position`

Fetch a specific derivative position for a symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol of the market the position is held in, default is undefined (TS: string) (value)

## Returns

\{:ok, a [position structure]\{@link https://docs.ccxt.com/?id=position-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Position>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified market symbol of the market the position is held in, default is undefined (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [position structure]{@link https://docs.ccxt.com/?id=position-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Position>)"
  }
}
```

# `fetch_position_adl_rank`

Fetch position adl rank.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (TS: string) (value)

## Returns

\{:ok, an [auto de leverage structure](https://docs.ccxt.com/?id=auto-de-leverage-structure)\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<ADL>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an [auto de leverage structure](https://docs.ccxt.com/?id=auto-de-leverage-structure)} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<ADL>)"
  }
}
```

# `fetch_position_history`

Fetch position history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_position_mode`

Fetch position mode.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_positions`

Fetch all open derivative positions.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `method` - method name to call, "positionRisk", "account" or "option", default is "positionRisk"
  * `params` - extra parameters specific to the exchange API endpoint
  * `symbols` - list of unified market symbols (TS: Strings)
  * `use_v2` - set to true if you want to use the obsolete endpoint, where some more additional fields were provided

## Returns

\{:ok, Unified equity positions.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Position[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "list of unified market symbols (TS: Strings)",
      kind: :value
    },
    params: %{
      description: "extra parameters specific to the exchange API endpoint",
      kind: :value
    },
    method: %{
      description: "method name to call, \"positionRisk\", \"account\" or \"option\", default is \"positionRisk\"",
      kind: :value
    },
    use_v2: %{
      description: "set to true if you want to use the obsolete endpoint, where some more additional fields were provided",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified equity positions.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Position[]>)"
  }
}
```

# `fetch_positions_adl_rank`

Fetch positions adl rank.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `portfolio_margin` - set to true for the portfolio margin account
  * `symbols` - list of unified market symbols (TS: Strings)

## Returns

\{:ok, an array of [auto de leverage structure]\{@link https://docs.ccxt.com/?id=auto-de-leverage-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<ADL[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    symbols: %{
      description: "list of unified market symbols (TS: Strings)",
      kind: :value
    },
    portfolio_margin: %{
      description: "set to true for the portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, an array of [auto de leverage structure]{@link https://docs.ccxt.com/?id=auto-de-leverage-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<ADL[]>)"
  }
}
```

# `fetch_positions_for_symbol`

Fetch positions for symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

\{:ok, a list of position structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Position[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of position structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Position[]>)"
  }
}
```

# `fetch_positions_history`

Fetch positions history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `limit` - the maximum amount of records to fetch, default=50, max=100 (TS: Int)
  * `since` - timestamp in ms of the earliest position to fetch, params["until"] - since <= 7 days (TS: Int)
  * `sub_type` - 'linear' or 'inverse'
  * `symbols` - a list of unified market symbols (TS: Strings)
  * `until` - timestamp in ms of the latest position to fetch, params["until"] - since <= 7 days

## Returns

\{:ok, a list of [position structures]\{@link https://docs.ccxt.com/?id=position-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Position[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    until: %{
      description: "timestamp in ms of the latest position to fetch, params[\"until\"] - since <= 7 days",
      kind: :value
    },
    symbols: %{
      description: "a list of unified market symbols (TS: Strings)",
      kind: :value
    },
    limit: %{
      description: "the maximum amount of records to fetch, default=50, max=100 (TS: Int)",
      kind: :value
    },
    since: %{
      description: "timestamp in ms of the earliest position to fetch, params[\"until\"] - since <= 7 days (TS: Int)",
      kind: :value
    },
    sub_type: %{description: "'linear' or 'inverse'", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [position structures]{@link https://docs.ccxt.com/?id=position-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Position[]>)"
  }
}
```

# `fetch_positions_risk`

Fetch positions risk.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

\{:ok, a list of position structures\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Position[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of position structures} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Position[]>)"
  }
}
```

# `fetch_private_deposit_withdraw_fees`

Fetch private deposit withdraw fees.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_private_trading_fee`

Fetch private trading fee.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_private_trading_fees`

Fetch private trading fees.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_private_transaction_fees`

Fetch private transaction fees.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_public_deposit_withdraw_fees`

Fetch public deposit withdraw fees.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_public_trading_fee`

Fetch public trading fee.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_public_trading_fees`

Fetch public trading fees.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_public_transaction_fees`

Fetch public transaction fees.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_settlement_history`

Fetch settlement history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_spot_balance`

Fetch spot balance.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_spot_markets`

Fetch spot markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_spot_ohlcv`

Fetch spot ohlcv.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)
  * `timeframe` - timeframe (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `fetch_spot_order`

Fetch spot order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_spot_order_trades`

Fetch spot order trades.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_spot_orders`

Fetch spot orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_spot_orders_by_states`

Fetch spot orders by states.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_spot_orders_by_status`

Fetch spot orders by status.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_status`

Fetch the exchange operational status.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_swap_and_future_markets`

Fetch swap and future markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_swap_balance`

Fetch swap balance.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_swap_markets`

Fetch swap markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_ticker`

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

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to fetch the ticker for (TS: string) (value)

## Options

  * `rolling` - (spot only) default false, if true, uses the rolling 24 hour ticker endpoint /api/v3/ticker

## Returns

\{:ok, a [ticker structure]\{@link https://docs.ccxt.com/?id=ticker-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Ticker>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    rolling: %{
      description: "(spot only) default false, if true, uses the rolling 24 hour ticker endpoint /api/v3/ticker",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to fetch the ticker for (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Ticker>)"
  }
}
```

# `fetch_tickers`

Fetch tickers for all or specified trading pairs.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `sub_type` - "linear" or "inverse"
  * `symbols` - unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned (TS: Strings)
  * `type` - 'spot', 'option', use params["subType"] for swap and future markets

## Returns

\{:ok, a dictionary of [ticker structures]\{@link https://docs.ccxt.com/?id=ticker-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Tickers>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    type: %{
      description: "'spot', 'option', use params[\"subType\"] for swap and future markets",
      kind: :value
    },
    symbols: %{
      description: "unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned (TS: Strings)",
      kind: :value
    },
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Tickers>)"
  }
}
```

# `fetch_time`

Fetch the exchange server time.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `sub_type` - "linear" or "inverse"

## Returns

\{:ok, Clock timestamp in milliseconds.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Int>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}},
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Clock timestamp in milliseconds.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Int>)"
  }
}
```

# `fetch_trades`

Fetch recent public trades for a symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified symbol of the market to fetch trades for (TS: string) (value)

## Options

  * `fetch_trades_method` - 'publicGetAggTrades' (spot default), 'fapiPublicGetAggTrades' (swap default), 'dapiPublicGetAggTrades' (future default), 'eapiPublicGetTrades' (option default), 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', 'publicGetHistoricalTrades', 'fapiPublicGetHistoricalTrades', 'dapiPublicGetHistoricalTrades', 'eapiPublicGetHistoricalTrades'
  * `from_id` - trade id to fetch from, default gets most recent trades, not used when fetchTradesMethod is 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', or 'eapiPublicGetTrades'
  * `limit` - default 500, max 1000 (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)  EXCHANGE SPECIFIC PARAMETERS
  * `since` - only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades' (TS: Int)
  * `until` - only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'

## Returns

\{:ok, Unified public stock prints from GET /v2/stocks/\{symbol\}/trades.\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Trade[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    until: %{
      description: "only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades'",
      kind: :value
    },
    limit: %{description: "default 500, max 1000 (TS: Int)", kind: :value},
    since: %{
      description: "only used when fetchTradesMethod is 'publicGetAggTrades', 'fapiPublicGetAggTrades', or 'dapiPublicGetAggTrades' (TS: Int)",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)  EXCHANGE SPECIFIC PARAMETERS",
      kind: :value
    },
    fetch_trades_method: %{
      description: "'publicGetAggTrades' (spot default), 'fapiPublicGetAggTrades' (swap default), 'dapiPublicGetAggTrades' (future default), 'eapiPublicGetTrades' (option default), 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', 'publicGetHistoricalTrades', 'fapiPublicGetHistoricalTrades', 'dapiPublicGetHistoricalTrades', 'eapiPublicGetHistoricalTrades'",
      kind: :value
    },
    from_id: %{
      description: "trade id to fetch from, default gets most recent trades, not used when fetchTradesMethod is 'publicGetTrades', 'fapiPublicGetTrades', 'dapiPublicGetTrades', or 'eapiPublicGetTrades'",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{
      description: "unified symbol of the market to fetch trades for (TS: string)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, Unified public stock prints from GET /v2/stocks/{symbol}/trades.} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Trade[]>)"
  }
}
```

# `fetch_trading_fee`

Fetch the trading fee for a specific symbol.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)

## Options

  * `portfolio_margin` - set to true if you would like to fetch trading fees in a portfolio margin account
  * `sub_type` - "linear" or "inverse"

## Returns

\{:ok, a [fee structure]\{@link https://docs.ccxt.com/?id=fee-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<TradingFeeInterface>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value},
    portfolio_margin: %{
      description: "set to true if you would like to fetch trading fees in a portfolio margin account",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [fee structure]{@link https://docs.ccxt.com/?id=fee-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<TradingFeeInterface>)"
  }
}
```

# `fetch_trading_fees`

Fetch trading fees for all symbols.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `sub_type` - "linear" or "inverse"

## Returns

\{:ok, a dictionary of [fee structures]\{@link https://docs.ccxt.com/?id=fee-structure\} indexed by market symbols\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<TradingFees>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{sub_type: %{description: "\"linear\" or \"inverse\"", kind: :value}},
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a dictionary of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure} indexed by market symbols} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<TradingFees>)"
  }
}
```

# `fetch_trading_limits`

Fetch trading limits.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_trading_limits_by_id`

Fetch trading limits by id.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_transaction_fee`

Fetch transaction fee.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_transaction_fees`

Fetch transaction fees.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_transactions`

Fetch transactions.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_transactions_by_type`

Fetch transactions by type.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `type` - type (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_transfer`

Fetch transfer.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (TS: string) (value)

## Options

  * `code` - code (TS: Str)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{code: %{description: "code (TS: Str)", kind: :value}},
  params: %{
    id: %{description: "id (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `fetch_transfers`

Fetch transfers.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `code` - unified currency code of the currency transferred (TS: Str)
  * `internal` - default false, when true will fetch pay trade history
  * `limit` - the maximum number of transfers structures to retrieve (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `since` - the earliest time in ms to fetch transfers for (TS: Int)
  * `until` - the latest time in ms to fetch transfers for

## Returns

\{:ok, a list of [transfer structures]\{@link https://docs.ccxt.com/?id=transfer-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<TransferEntry[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    code: %{
      description: "unified currency code of the currency transferred (TS: Str)",
      kind: :value
    },
    internal: %{
      description: "default false, when true will fetch pay trade history",
      kind: :value
    },
    until: %{
      description: "the latest time in ms to fetch transfers for",
      kind: :value
    },
    limit: %{
      description: "the maximum number of transfers structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch transfers for (TS: Int)",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [transfer structures]{@link https://docs.ccxt.com/?id=transfer-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<TransferEntry[]>)"
  }
}
```

# `fetch_underlying_assets`

Fetch underlying assets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_usdt_markets`

Fetch usdt markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_uta_balance`

Fetch uta balance.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_uta_canceled_and_closed_orders`

Fetch uta canceled and closed orders.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_uta_markets`

Fetch uta markets.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_uta_ohlcv`

Fetch uta ohlcv.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)
  * `timeframe` - timeframe (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `fetch_uta_order`

Fetch uta order.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_uta_orders_by_status`

Fetch uta orders by status.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_volatility_history`

Fetch volatility history.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)

## Returns

\{:ok, a list of volatility history objects\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<VolatilityHistory[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "symbol", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of volatility history objects} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<VolatilityHistory[]>)"
  }
}
```

# `fetch_withdraw_addresses`

Fetch withdraw addresses.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `fetch_withdrawal`

Fetch withdrawal.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `id` - id (value)

## Returns

\{:ok, a transaction structure\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Transaction>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    id: %{description: "id", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a transaction structure} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Transaction>)"
  }
}
```

# `fetch_withdrawals`

Fetch withdrawal history.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Options

  * `code` - unified currency code (TS: Str)
  * `fiat` - if true, only fiat withdrawals will be returned
  * `limit` - the maximum number of withdrawals structures to retrieve (TS: Int)
  * `paginate` - default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
  * `since` - the earliest time in ms to fetch withdrawals for (TS: Int)
  * `until` - the latest time in ms to fetch withdrawals for

## Returns

\{:ok, a list of [transaction structures]\{@link https://docs.ccxt.com/?id=transaction-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Transaction[]>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    code: %{description: "unified currency code (TS: Str)", kind: :value},
    until: %{
      description: "the latest time in ms to fetch withdrawals for",
      kind: :value
    },
    limit: %{
      description: "the maximum number of withdrawals structures to retrieve (TS: Int)",
      kind: :value
    },
    since: %{
      description: "the earliest time in ms to fetch withdrawals for (TS: Int)",
      kind: :value
    },
    paginate: %{
      description: "default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)",
      kind: :value
    },
    fiat: %{
      description: "if true, only fiat withdrawals will be returned",
      kind: :value
    }
  },
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a list of [transaction structures]{@link https://docs.ccxt.com/?id=transaction-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Transaction[]>)"
  }
}
```

# `load_markets`

```elixir
@spec load_markets(
  Bourse.Exchange.t(),
  keyword()
) :: {:ok, Bourse.Exchange.t()} | {:error, term()}
```

Fetches markets and returns an enriched `%Exchange{}` with `:markets` populated.

Pure-data loadMarkets equivalent: no process or global cache. Thread the
returned struct into subsequent unified calls so market-metadata consumers
(e.g. lighter symbol→`market_id` resolution) reuse the list without another
network round-trip. Call again for an explicit reload.

`load_markets/2` always loads the full catalog — it is not account-scoped.
Account-selection keys that private reads use to pick a family (`:type`,
`:subType`, `:sub_type`) are accepted and ignored so a caller can thread one
`request_opts` list through `load_markets/2`, `fetch_balance/2`,
`fetch_positions/2` and `fetch_open_orders/2`. They do not filter the catalog.

Other options match the unified dispatch set (`:plug`, `:timeout`, `:headers`,
`:base_url`, `:market_type`, `:endpoint_index`). An unrecognized HTTP option
is rejected as `{:error, %Bourse.Error{type: :bad_request}}` before any
request is issued.

    {:ok, exchange} = Bourse.exchange("lighter")
    {:ok, exchange} = Bourse.load_markets(exchange)
    {:ok, ticker} = Bourse.fetch_ticker(exchange, "BTC/USDC:USDC")

# `load_markets!`

```elixir
@spec load_markets!(
  Bourse.Exchange.t(),
  keyword()
) :: Bourse.Exchange.t()
```

Bang variant of `load_markets/2`. Raises on error.

# `reduce_margin`

Reduce margin.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - unified market symbol (TS: string) (value)
  * `amount` - the amount of margin to remove (TS: number) (value)

## Returns

\{:ok, a [margin structure]\{@link https://docs.ccxt.com/?id=margin-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<MarginModification>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value},
    symbol: %{description: "unified market symbol (TS: string)", kind: :value},
    amount: %{
      description: "the amount of margin to remove (TS: number)",
      kind: :value
    }
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [margin structure]{@link https://docs.ccxt.com/?id=margin-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<MarginModification>)"
  }
}
```

# `repay_cross_margin`

Repay cross margin.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (TS: string) (value)
  * `amount` - amount (TS: float) (value)

## Returns

\{:ok, a margin loan structure\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<MarginLoan>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  params: %{
    code: %{description: "code (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount (TS: float)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a margin loan structure} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<MarginLoan>)"
  }
}
```

# `repay_isolated_margin`

Repay isolated margin.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)
  * `code` - code (value)
  * `amount` - amount (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `repay_margin`

Repay margin.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)
  * `amount` - amount (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `set_leverage`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `set_margin`

Set margin.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `symbol` - symbol (value)
  * `amount` - amount (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `set_margin_mode`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `set_position_mode`

Set position mode.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `hedge_mode` - hedge mode (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

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

# `timeframes`

```elixir
@spec timeframes(Bourse.Exchange.t()) :: %{required(String.t()) =&gt; String.t()}
```

Returns unified-to-native OHLCV timeframe labels for an exchange.

## Parameters

  * `exchange` - Exchange configuration struct (value)

## Returns

Unified label => exchange-native OHLCV label (e.g. "1h" => "60" on Bybit) (`map`)

```elixir
# descripex:contract
%{
  params: %{
    exchange: %{description: "Exchange configuration struct", kind: :value}
  },
  returns: %{
    type: :map,
    description: "Unified label => exchange-native OHLCV label (e.g. \"1h\" => \"60\" on Bybit)"
  }
}
```

# `transfer`

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

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - unified currency code (TS: string) (value)
  * `amount` - amount to transfer (TS: number) (value)
  * `from_account` - from account (TS: string) (value)
  * `to_account` - to account (TS: string) (value)

## Options

  * `symbol` - the unified symbol, required for isolated margin transfers
  * `type` - exchange specific transfer type

## Returns

\{:ok, a [transfer structure]\{@link https://docs.ccxt.com/?id=transfer-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<TransferEntry>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{
    type: %{description: "exchange specific transfer type", kind: :value},
    symbol: %{
      description: "the unified symbol, required for isolated margin transfers",
      kind: :value
    }
  },
  params: %{
    code: %{description: "unified currency code (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    amount: %{description: "amount to transfer (TS: number)", kind: :value},
    from_account: %{description: "from account (TS: string)", kind: :value},
    to_account: %{description: "to account (TS: string)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<TransferEntry>)"
  }
}
```

# `transfer_between_main_and_sub_account`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `transfer_between_sub_accounts`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `transfer_classic`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `transfer_out`

Transfer out.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - code (value)
  * `amount` - amount (value)
  * `address` - address (value)

## Returns

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

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `transfer_uta`

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, Bourse.Error.t()\} on failure (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# 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, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, map()} on success, {:error, Bourse.Error.t()} on failure"
  }
}
```

# `withdraw`

Withdraw funds to an external address.

## Parameters

  * `exchange` - Exchange configuration struct (value)
  * `code` - unified currency code (TS: string) (value)
  * `amount` - the amount to withdraw (TS: number) (value)
  * `address` - the address to withdraw to (TS: string) (value)

## Options

  * `tag` - tag (TS: Str)

## Returns

\{:ok, a [transaction structure]\{@link https://docs.ccxt.com/?id=transaction-structure\}\} on success, \{:error, Bourse.Error.t()\} on failure (TS: Promise<Transaction>) (`result_tuple`)

## Errors

  * `:not_supported`
  * `:authentication_error`
  * `:invalid_nonce`
  * `:rate_limit_exceeded`
  * `:network_error`

```elixir
# descripex:contract
%{
  opts: %{tag: %{description: "tag (TS: Str)", kind: :value}},
  params: %{
    code: %{description: "unified currency code (TS: string)", kind: :value},
    exchange: %{description: "Exchange configuration struct", kind: :value},
    address: %{
      description: "the address to withdraw to (TS: string)",
      kind: :value
    },
    amount: %{description: "the amount to withdraw (TS: number)", kind: :value}
  },
  errors: [:not_supported, :authentication_error, :invalid_nonce,
   :rate_limit_exceeded, :network_error],
  returns: %{
    type: :result_tuple,
    description: "{:ok, a [transaction structure]{@link https://docs.ccxt.com/?id=transaction-structure}} on success, {:error, Bourse.Error.t()} on failure (TS: Promise<Transaction>)"
  }
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
