Packages

Elixir client library for cryptocurrency exchanges — generated from CCXT specs via compile-time macros.

Current section

Files

Jump to
ccxt_client priv specs extracted apex.exs
Raw

priv/specs/extracted/apex.exs

# Apex Exchange Specification
#
# Auto-generated by: mix ccxt.extract apex
# CCXT version: 4.5.34
# Spec format version: 1
#
# Review before use:
# - signing: Detected from sign() method, verify with testnet
# - endpoints: Raw paths extracted, map to unified API as needed
# - exceptions: Extracted (exact, broad, HTTP status codes)
# - features/options: Extracted from describe()
# - classification: Set to :supported initially, promote after validation
#
%{
api_param_requirements: nil,
certified: false,
classification: :pro,
comment: nil,
countries: [],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"XBT" => "BTC"
},
dex: true,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 28,
"coveragePercent" => 100,
"enabledMethods" => 32,
"excluded" => [
%{
"method" => "fetchAccounts",
"reason" => "apex fetchAccounts() is not supported yet"
},
%{
"method" => "fetchTransfer",
"reason" => "apex fetchTransfer () is not supported yet"
},
%{
"method" => "fetchTransfers",
"reason" => "apex fetchTransfers () is not supported yet"
}
],
"excludedMethods" => 3,
"extractableMethods" => 29,
"failures" => [
%{
"error" => "apex createOrder() requires a price argument for market orders",
"method" => "createMarketOrder"
}
]
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :post,
name: :cancel_all_orders,
param_mappings: %{},
params: [
:symbol
],
path: "/v3/delete-open-orders",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :post,
name: :cancel_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/v3/delete-order",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :create_limit_order,
param_mappings: %{},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/v3/account",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :create_order,
param_mappings: %{},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/v3/account",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :create_post_only_order,
param_mappings: %{},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/v3/account",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :create_reduce_only_order,
param_mappings: %{},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/v3/account",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :create_stop_order,
param_mappings: %{},
params: [
:symbol,
:type,
:side,
:amount,
:price,
:triggerPrice
],
path: "/v3/account",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :create_trigger_order,
param_mappings: %{},
params: [
:symbol,
:type,
:side,
:amount,
:price,
:triggerPrice
],
path: "/v3/account",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/v3/account-balance",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_currencies,
param_mappings: %{},
params: [],
path: "/v3/symbols",
response_transformer: {:extract_path, ["data", "spotConfig"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_funding_history,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/v3/funding",
response_transformer: {:extract_path, ["data", "fundingValues"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_funding_rate_history,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/v3/history-funding",
response_transformer: {:extract_path, ["data", "historyFunds"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"limit" => 100
},
market_type: :swap,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/v3/depth",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/v3/symbols",
response_transformer: {:extract_path, ["data", "contractConfig", "perpetualContract"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_my_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/v3/fills",
response_transformer: {:extract_path, ["data", "orders"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"interval" => "60"
},
market_type: :swap,
method: :get,
name: :fetch_ohlcv,
param_mappings: %{
"since" => "start",
"timeframe" => "interval"
},
params: [
:symbol,
:timeframe,
:since,
:limit
],
path: "/v3/klines",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_open_interest,
param_mappings: %{},
params: [
:symbol
],
path: "/v3/ticker",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_open_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/v3/open-orders",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/v3/order",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/v3/depth",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_order_trades,
param_mappings: %{
"id" => "orderId"
},
params: [
:id,
:symbol,
:since,
:limit
],
path: "/v3/order-fills",
response_transformer: {:extract_path, ["data", "orders"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/v3/history-orders",
response_transformer: {:extract_path, ["data", "orders"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_positions,
param_mappings: %{},
params: [
:symbols
],
path: "/v3/account",
response_transformer: {:extract_path, ["data", "positions"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_ticker,
param_mappings: %{},
params: [
:symbol
],
path: "/v3/ticker",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_tickers,
param_mappings: %{},
params: [
:symbols
],
path: "/v3/data/all-ticker-info",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_time,
param_mappings: %{},
params: [],
path: "/v3/time",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :swap,
method: :get,
name: :fetch_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/v3/trades",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"initialMarginRate" => "0.1"
},
market_type: :swap,
method: :post,
name: :set_leverage,
param_mappings: %{},
params: [
:leverage,
:symbol
],
path: "/v3/set-initial-margin-rate",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
}
],
error_code_details: %{
10001 => %{
description: nil,
type: :invalid_parameters
},
20006 => %{
description: "apikey sign error",
type: :exchange_error
},
20016 => %{
description: "apikey sign error",
type: :exchange_error
},
"ORDER_POSSIBLE_LEAD_TO_ACCOUNT_LIQUIDATED" => %{
description: nil,
type: :invalid_order
},
"ORDER_PRICE_MUST_GREETER_ZERO" => %{
description: nil,
type: :invalid_order
},
"ORDER_WITH_THIS_PRICE_CANNOT_REDUCE_POSITION_ONLY" => %{
description: nil,
type: :invalid_order
}
},
error_codes: %{
10001 => :invalid_parameters,
20006 => :exchange_error,
20016 => :exchange_error,
"ORDER_POSSIBLE_LEAD_TO_ACCOUNT_LIQUIDATED" => :invalid_order,
"ORDER_PRICE_MUST_GREETER_ZERO" => :invalid_order,
"ORDER_WITH_THIS_PRICE_CANNOT_REDUCE_POSITION_ONLY" => :invalid_order
},
exceptions: %{
broad: %{
"ORDER_POSSIBLE_LEAD_TO_ACCOUNT_LIQUIDATED" => :invalid_order,
"ORDER_PRICE_MUST_GREETER_ZERO" => :invalid_order,
"ORDER_WITH_THIS_PRICE_CANNOT_REDUCE_POSITION_ONLY" => :invalid_order
},
exact: %{
"10001" => :bad_request,
"20006" => :"apikey sign error",
"20016" => :"request para error"
}
},
exchange_options: %{
"brokerId" => "6956",
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"defaultSlippage" => 0.05,
"defaultType" => "swap",
"networksById" => %{}
},
extended_metadata: %{
fees_url: "https://apex-pro.gitbook.io/apex-pro/apex-omni-live-now/trading-perpetual-contracts/trading-fees",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://github.com/user-attachments/assets/fef8f2f7-4265-46aa-965e-33a91881cb00",
referral_url: "https://omni.apex.exchange/trade"
},
extracted_metadata: %{
ccxt_version: "4.5.34"
},
features: %{
default: %{
create_order: %{
hedged: false,
iceberg: false,
leverage: false,
margin_mode: false,
market_buy_by_cost: false,
market_buy_requires_price: false,
self_trade_prevention: false,
stop_loss_price: false,
take_profit_price: false,
time_in_force: %{
fok: true,
gtd: true,
ioc: true,
po: true
},
trailing: true,
trigger_direction: false,
trigger_price: true
},
fetch_my_trades: %{
days_back: 100000,
limit: 500,
margin_mode: false,
symbol_required: false,
until_days: 100000
},
fetch_ohlcv: %{
limit: 200
},
fetch_open_orders: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_orders: %{
days_back: 100000,
limit: 100,
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false,
until_days: 100000
},
sandbox: true
},
swap: %{
linear: %{
extends: "default"
}
}
},
fees: %{
swap: %{
maker: 0.0002,
taker: 0.0005
}
},
handle_content_type_application_zip: nil,
handle_errors_source: "handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n //\n // {\"code\":3,\"msg\":\"Order price must be greater than 0. Order price is 0.\",\"key\":\"ORDER_PRICE_MUST_GREETER_ZERO\",\"detail\":{\"price\":\"0\"}}\n // {\"code\":400,\"msg\":\"strconv.ParseInt: parsing \\\"dsfdfsd\\\": invalid syntax\",\"timeCost\":5320995}\n //\n if (response === undefined) {\n return undefined;\n }\n const errorCode = this.safeInteger(response, 'code');\n if (errorCode !== undefined && errorCode !== 0) {\n const feedback = this.id + ' ' + body;\n const message = this.safeString2(response, 'key', 'msg');\n this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);\n const status = code.toString();\n this.throwExactlyMatchedException(this.exceptions['exact'], status, feedback);\n throw new errors.ExchangeError(feedback);\n }\n return undefined;\n }",
has: %{
add_margin: false,
borrow_cross_margin: false,
borrow_isolated_margin: false,
borrow_margin: false,
c_o_r_s: false,
cancel_all_orders: true,
cancel_all_orders_after: false,
cancel_all_orders_ws: false,
cancel_order: true,
cancel_order_with_client_order_id: false,
cancel_order_ws: false,
cancel_orders: false,
cancel_orders_for_symbols: false,
cancel_orders_with_client_order_id: false,
cancel_orders_ws: false,
close_all_positions: false,
close_position: false,
create_deposit_address: false,
create_limit_buy_order: false,
create_limit_buy_order_ws: false,
create_limit_order: true,
create_limit_order_ws: false,
create_limit_sell_order: false,
create_limit_sell_order_ws: false,
create_market_buy_order: false,
create_market_buy_order_with_cost: false,
create_market_buy_order_with_cost_ws: false,
create_market_buy_order_ws: false,
create_market_order: true,
create_market_order_with_cost: false,
create_market_order_with_cost_ws: false,
create_market_order_ws: true,
create_market_sell_order: false,
create_market_sell_order_with_cost: false,
create_market_sell_order_with_cost_ws: false,
create_market_sell_order_ws: false,
create_order: true,
create_order_with_take_profit_and_stop_loss: false,
create_order_with_take_profit_and_stop_loss_ws: false,
create_order_ws: false,
create_orders: false,
create_post_only_order: true,
create_post_only_order_ws: false,
create_reduce_only_order: true,
create_reduce_only_order_ws: false,
create_stop_limit_order: false,
create_stop_limit_order_ws: false,
create_stop_loss_order: false,
create_stop_loss_order_ws: false,
create_stop_market_order: false,
create_stop_market_order_ws: false,
create_stop_order: true,
create_stop_order_ws: false,
create_take_profit_order: false,
create_take_profit_order_ws: false,
create_trailing_amount_order: false,
create_trailing_amount_order_ws: false,
create_trailing_percent_order: false,
create_trailing_percent_order_ws: false,
create_trigger_order: true,
create_trigger_order_ws: false,
deposit: false,
edit_order: false,
edit_order_with_client_order_id: false,
edit_order_ws: false,
edit_orders: false,
fetch_accounts: true,
fetch_all_greeks: false,
fetch_balance: true,
fetch_balance_ws: false,
fetch_bids_asks: false,
fetch_borrow_interest: false,
fetch_borrow_rate: false,
fetch_borrow_rate_histories: false,
fetch_borrow_rate_history: false,
fetch_borrow_rates: false,
fetch_borrow_rates_per_symbol: false,
fetch_canceled_and_closed_orders: false,
fetch_canceled_orders: false,
fetch_closed_order: false,
fetch_closed_orders: false,
fetch_closed_orders_ws: false,
fetch_convert_currencies: false,
fetch_convert_quote: false,
fetch_convert_trade: false,
fetch_convert_trade_history: false,
fetch_cross_borrow_rate: false,
fetch_cross_borrow_rates: false,
fetch_currencies: true,
fetch_currencies_ws: true,
fetch_deposit: false,
fetch_deposit_address: false,
fetch_deposit_addresses: false,
fetch_deposit_addresses_by_network: false,
fetch_deposit_withdraw_fee: false,
fetch_deposit_withdraw_fees: false,
fetch_deposits: false,
fetch_deposits_withdrawals: false,
fetch_deposits_ws: false,
fetch_funding_history: true,
fetch_funding_interval: false,
fetch_funding_intervals: false,
fetch_funding_rate: false,
fetch_funding_rate_history: true,
fetch_funding_rates: false,
fetch_greeks: false,
fetch_index_ohlcv: false,
fetch_isolated_borrow_rate: false,
fetch_isolated_borrow_rates: false,
fetch_isolated_positions: false,
fetch_l2_order_book: true,
fetch_l3_order_book: false,
fetch_last_prices: false,
fetch_ledger: false,
fetch_ledger_entry: false,
fetch_leverage: false,
fetch_leverage_tiers: false,
fetch_leverages: false,
fetch_liquidations: false,
fetch_long_short_ratio: false,
fetch_long_short_ratio_history: false,
fetch_margin_adjustment_history: false,
fetch_margin_mode: false,
fetch_margin_modes: false,
fetch_mark_ohlcv: false,
fetch_mark_prices: false,
fetch_market_leverage_tiers: false,
fetch_markets: true,
fetch_markets_ws: false,
fetch_my_liquidations: false,
fetch_my_settlement_history: false,
fetch_my_trades: true,
fetch_my_trades_ws: false,
fetch_ohlcv: true,
fetch_ohlcv_ws: false,
fetch_open_interest: true,
fetch_open_interest_history: false,
fetch_open_interests: false,
fetch_open_order: false,
fetch_open_orders: true,
fetch_open_orders_ws: false,
fetch_option: false,
fetch_option_chain: false,
fetch_order: true,
fetch_order_book: true,
fetch_order_book_ws: false,
fetch_order_books: false,
fetch_order_trades: true,
fetch_order_with_client_order_id: false,
fetch_order_ws: false,
fetch_orders: true,
fetch_orders_by_status: false,
fetch_orders_ws: false,
fetch_position: false,
fetch_position_history: false,
fetch_position_mode: false,
fetch_position_ws: false,
fetch_positions: true,
fetch_positions_for_symbol: false,
fetch_positions_for_symbol_ws: false,
fetch_positions_history: false,
fetch_positions_risk: false,
fetch_positions_ws: false,
fetch_premium_index_ohlcv: false,
fetch_settlement_history: false,
fetch_status: false,
fetch_ticker: true,
fetch_ticker_ws: false,
fetch_tickers: true,
fetch_tickers_ws: false,
fetch_time: true,
fetch_trades: true,
fetch_trades_ws: false,
fetch_trading_fee: false,
fetch_trading_fees: false,
fetch_trading_fees_ws: false,
fetch_trading_limits: false,
fetch_transaction_fee: false,
fetch_transaction_fees: false,
fetch_transactions: false,
fetch_transfer: true,
fetch_transfers: true,
fetch_underlying_assets: false,
fetch_volatility_history: false,
fetch_withdraw_addresses: false,
fetch_withdrawal: false,
fetch_withdrawal_whitelist: false,
fetch_withdrawals: false,
fetch_withdrawals_ws: false,
future: false,
margin: false,
option: false,
private_api: true,
public_api: true,
reduce_margin: false,
repay_cross_margin: false,
repay_isolated_margin: false,
sandbox: true,
set_leverage: true,
set_margin: false,
set_margin_mode: false,
set_position_mode: false,
sign_in: false,
spot: false,
swap: true,
transfer: false,
un_watch_my_trades: false,
un_watch_ohlcv: false,
un_watch_ohlcv_for_symbols: false,
un_watch_order_book: false,
un_watch_order_book_for_symbols: false,
un_watch_orders: false,
un_watch_positions: false,
un_watch_ticker: false,
un_watch_tickers: false,
un_watch_trades: false,
un_watch_trades_for_symbols: false,
watch_balance: false,
watch_bids_asks: false,
watch_liquidations: false,
watch_liquidations_for_symbols: false,
watch_my_liquidations: false,
watch_my_liquidations_for_symbols: false,
watch_my_trades: true,
watch_ohlcv: true,
watch_ohlcv_for_symbols: true,
watch_order_book: true,
watch_order_book_for_symbols: true,
watch_orders: true,
watch_orders_for_symbols: false,
watch_position: false,
watch_positions: true,
watch_status: false,
watch_ticker: true,
watch_tickers: true,
watch_trades: true,
watch_trades_for_symbols: false,
withdraw: false,
ws: false
},
http_config: nil,
id: "apex",
markets: nil,
name: "Apex",
ohlcv_timestamp_resolution: :seconds,
options: %{
:broker_id => "6956",
:default_account_type => "swap",
"default_slippage" => 0.05,
:default_type => "swap"
},
order_mappings: nil,
param_mappings: %{
"id" => "orderId",
"since" => "start",
"timeframe" => "interval"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 380,
"line_start" => 372,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "accountId"
},
%{
"comment" => nil,
"key" => "type",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "code",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "account"
}
],
"name" => "parseAccount",
"signature" => "parseAccount (account: Dict): Account",
"source" => "parseAccount (account: Dict): Account {\n const accountId = this.safeString (account, 'id', '0');\n return {\n 'id': accountId,\n 'type': undefined,\n 'code': undefined,\n 'info': account,\n };\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"totalEquityValue\": \"100.000000\",\n \"availableBalance\": \"100.000000\",\n \"initialMargin\": \"100.000000\",\n \"maintenanceMargin\": \"100.000000\",\n \"symbolToOraclePrice\": {\n \"BTC-USDC\": {\n \"oraclePrice\": \"20000\",\n \"createdTime\": 124566\n }\n }\n }"
],
"line_end" => 355,
"line_start" => 328,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n //\n // {\n // \"totalEquityValue\": \"100.000000\",\n // \"availableBalance\": \"100.000000\",\n // \"initialMargin\": \"100.000000\",\n // \"maintenanceMargin\": \"100.000000\",\n // \"symbolToOraclePrice\": {\n // \"BTC-USDC\": {\n // \"oraclePrice\": \"20000\",\n // \"createdTime\": 124566\n // }\n // }\n // }\n //\n const timestamp = this.milliseconds ();\n const result: Dict = {\n 'info': response,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n };\n const code = 'USDT';\n const account = this.account ();\n account['free'] = this.safeString (response, 'availableBalance');\n account['total'] = this.safeString (response, 'totalEquityValue');\n result[code] = account;\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": \"1234\",\n \"symbol\": \"BTC-USDT\",\n \"fundingValue\": \"10000\",\n \"rate\": \"0.0000125000\",\n \"positionSize\": \"500\",\n \"price\": \"90\",\n \"side\": \"LONG\",\n \"status\": \"SUCCESS\",\n \"fundingTime\": 1647502440973,\n \"transactionId\": \"1234556\"\n }"
],
"line_end" => 1848,
"line_start" => 1819,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "income"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "this.safeSymbol (marketId, market)"
},
%{
"comment" => nil,
"key" => "code",
"value" => "code"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (income, 'id')"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.safeNumber (income, 'fundingValue')"
},
%{
"comment" => nil,
"key" => "rate",
"value" => "this.safeNumber (income, 'rate')"
}
],
"name" => "parseIncome",
"signature" => "parseIncome (income, market: Market = undefined)",
"source" => "parseIncome (income, market: Market = undefined) {\n //\n // {\n // \"id\": \"1234\",\n // \"symbol\": \"BTC-USDT\",\n // \"fundingValue\": \"10000\",\n // \"rate\": \"0.0000125000\",\n // \"positionSize\": \"500\",\n // \"price\": \"90\",\n // \"side\": \"LONG\",\n // \"status\": \"SUCCESS\",\n // \"fundingTime\": 1647502440973,\n // \"transactionId\": \"1234556\"\n // }\n //\n const marketId = this.safeString (income, 'symbol');\n market = this.safeMarket (marketId, market, undefined, 'contract');\n const code = 'USDT';\n const timestamp = this.safeInteger (income, 'fundingTime');\n return {\n 'info': income,\n 'symbol': this.safeSymbol (marketId, market),\n 'code': code,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'id': this.safeString (income, 'id'),\n 'amount': this.safeNumber (income, 'fundingValue'),\n 'rate': this.safeNumber (income, 'rate'),\n };\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 710,
"line_start" => 645,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "id2",
"value" => "id2"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "base",
"value" => "base"
},
%{
"comment" => nil,
"key" => "quote",
"value" => "quote"
},
%{
"comment" => nil,
"key" => "settle",
"value" => "settle"
},
%{
"comment" => nil,
"key" => "baseId",
"value" => "baseId"
},
%{
"comment" => nil,
"key" => "quoteId",
"value" => "quoteId"
},
%{
"comment" => nil,
"key" => "settleId",
"value" => "settleId"
},
%{
"comment" => nil,
"key" => "type",
"value" => "'swap'"
},
%{
"comment" => nil,
"key" => "spot",
"value" => "false"
},
%{
"comment" => nil,
"key" => "margin",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "swap",
"value" => "true"
},
%{
"comment" => nil,
"key" => "future",
"value" => "false"
},
%{
"comment" => nil,
"key" => "option",
"value" => "false"
},
%{
"comment" => nil,
"key" => "active",
"value" => "this.safeBool (market, 'enableTrade')"
},
%{
"comment" => nil,
"key" => "contract",
"value" => "true"
},
%{
"comment" => nil,
"key" => "linear",
"value" => "true"
},
%{
"comment" => nil,
"key" => "inverse",
"value" => "false"
},
%{
"comment" => nil,
"key" => "taker",
"value" => "takerFee"
},
%{
"comment" => nil,
"key" => "maker",
"value" => "makerFee"
},
%{
"comment" => nil,
"key" => "contractSize",
"value" => "this.safeNumber (market, 'minOrderSize')"
},
%{
"comment" => nil,
"key" => "expiry",
"value" => "(expiry === 0) ? undefined : expiry"
},
%{
"comment" => nil,
"key" => "expiryDatetime",
"value" => "(expiry === 0) ? undefined : this.iso8601 (expiry)"
},
%{
"comment" => nil,
"key" => "strike",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "optionType",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "precision",
"value" => "{\n 'amount': this.safeNumber (market, 'stepSize'),\n 'price': this.safeNumber (market, 'tickSize'),\n }"
},
%{
"comment" => nil,
"key" => "limits",
"value" => "{\n 'leverage': {\n 'min': this.safeNumber (market, 'displayMinLeverage'),\n 'max': this.safeNumber (market, 'displayMaxLeverage'),\n },\n 'amount': {\n 'min': this.safeNumber (market, 'minOrderSize'),\n 'max': this.safeNumber (market, 'maxOrderSize'),\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n }"
},
%{
"comment" => nil,
"key" => "created",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "market"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.safeNumber (market, 'stepSize')"
},
%{
"comment" => nil,
"key" => "price",
"value" => "this.safeNumber (market, 'tickSize')"
},
%{
"comment" => nil,
"key" => "leverage",
"value" => "{\n 'min': this.safeNumber (market, 'displayMinLeverage'),\n 'max': this.safeNumber (market, 'displayMaxLeverage'),\n }"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "{\n 'min': this.safeNumber (market, 'minOrderSize'),\n 'max': this.safeNumber (market, 'maxOrderSize'),\n }"
},
%{
"comment" => nil,
"key" => "price",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "min",
"value" => "this.safeNumber (market, 'minOrderSize')"
},
%{
"comment" => nil,
"key" => "max",
"value" => "this.safeNumber (market, 'maxOrderSize')"
},
%{
"comment" => nil,
"key" => "min",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "max",
"value" => "undefined"
}
],
"name" => "parseMarket",
"signature" => "parseMarket (market: Dict): Market",
"source" => "parseMarket (market: Dict): Market {\n const id = this.safeString (market, 'symbol');\n const id2 = this.safeString (market, 'crossSymbolName');\n const quoteId = this.safeString (market, 'l2PairId');\n const baseId = this.safeString (market, 'baseTokenId');\n const quote = this.safeString (market, 'settleAssetId');\n const base = this.safeCurrencyCode (baseId);\n const settleId = this.safeString (market, 'settleAssetId');\n const settle = this.safeCurrencyCode (settleId);\n const symbol = baseId + '/' + quote + ':' + settle;\n const expiry = 0;\n const takerFee = this.parseNumber ('0.0002');\n const makerFee = this.parseNumber ('0.0005');\n return this.safeMarketStructure ({\n 'id': id,\n 'id2': id2,\n 'symbol': symbol,\n 'base': base,\n 'quote': quote,\n 'settle': settle,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': settleId,\n 'type': 'swap',\n 'spot': false,\n 'margin': undefined,\n 'swap': true,\n 'future': false,\n 'option': false,\n 'active': this.safeBool (market, 'enableTrade'),\n 'contract': true,\n 'linear': true,\n 'inverse': false,\n 'taker': takerFee,\n 'maker': makerFee,\n 'contractSize': this.safeNumber (market, 'minOrderSize'),\n 'expiry': (expiry === 0) ? undefined : expiry,\n 'expiryDatetime': (expiry === 0) ? undefined : this.iso8601 (expiry),\n 'strike': undefined,\n 'optionType': undefined,\n 'precision': {\n 'amount': this.safeNumber (market, 'stepSize'),\n 'price': this.safeNumber (market, 'tickSize'),\n },\n 'limits': {\n 'leverage': {\n 'min': this.safeNumber (market, 'displayMinLeverage'),\n 'max': this.safeNumber (market, 'displayMaxLeverage'),\n },\n 'amount': {\n 'min': this.safeNumber (market, 'minOrderSize'),\n 'max': this.safeNumber (market, 'maxOrderSize'),\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n },\n 'created': undefined,\n 'info': market,\n });\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"start\": 1647511440000,\n \"symbol\": \"BTC-USD\",\n \"interval\": \"1\",\n \"low\": \"40000\",\n \"high\": \"45000\",\n \"open\": \"45000\",\n \"close\": \"40000\",\n \"volume\": \"1.002\",\n \"turnover\": \"3\"\n } {\"s\":\"BTCUSDT\",\"i\":\"1\",\"t\":1741265880000,\"c\":\"90235\",\"h\":\"90235\",\"l\":\"90156\",\"o\":\"90156\",\"v\":\"0.052\",\"tr\":\"4690.4466\"}"
],
"line_end" => 860,
"line_start" => 838,
"mappings" => [],
"name" => "parseOHLCV",
"signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV",
"source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // {\n // \"start\": 1647511440000,\n // \"symbol\": \"BTC-USD\",\n // \"interval\": \"1\",\n // \"low\": \"40000\",\n // \"high\": \"45000\",\n // \"open\": \"45000\",\n // \"close\": \"40000\",\n // \"volume\": \"1.002\",\n // \"turnover\": \"3\"\n // } {\"s\":\"BTCUSDT\",\"i\":\"1\",\"t\":1741265880000,\"c\":\"90235\",\"h\":\"90235\",\"l\":\"90156\",\"o\":\"90156\",\"v\":\"0.052\",\"tr\":\"4690.4466\"}\n //\n return [\n this.safeIntegerN (ohlcv, [ 'start', 't' ]),\n this.safeNumberN (ohlcv, [ 'open', 'o' ]),\n this.safeNumberN (ohlcv, [ 'high', 'h' ]),\n this.safeNumberN (ohlcv, [ 'low', 'l' ]),\n this.safeNumberN (ohlcv, [ 'close', 'c' ]),\n this.safeNumberN (ohlcv, [ 'volume', 'v' ]),\n ];\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"symbol\": \"BTCUSDT\",\n \"price24hPcnt\": \"0.450141\",\n \"lastPrice\": \"43511.50\",\n \"highPrice24h\": \"43513.50\",\n \"lowPrice24h\": \"29996.00\",\n \"markPrice\": \"43513.50\",\n \"indexPrice\": \"40828.94\",\n \"openInterest\": \"2036854775808\",\n \"turnover24h\": \"5626085.23749999\",\n \"volume24h\": \"169.317\",\n \"fundingRate\": \"0\",\n \"predictedFundingRate\": \"0\",\n \"nextFundingTime\": \"10:00:00\",\n \"tradeCount\": 100\n }"
],
"line_end" => 1055,
"line_start" => 1024,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "openInterestAmount",
"value" => "this.safeString (interest, 'openInterest')"
},
%{
"comment" => nil,
"key" => "openInterestValue",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "info",
"value" => "interest"
}
],
"name" => "parseOpenInterest",
"signature" => "parseOpenInterest (interest, market: Market = undefined)",
"source" => "parseOpenInterest (interest, market: Market = undefined) {\n //\n // {\n // \"symbol\": \"BTCUSDT\",\n // \"price24hPcnt\": \"0.450141\",\n // \"lastPrice\": \"43511.50\",\n // \"highPrice24h\": \"43513.50\",\n // \"lowPrice24h\": \"29996.00\",\n // \"markPrice\": \"43513.50\",\n // \"indexPrice\": \"40828.94\",\n // \"openInterest\": \"2036854775808\",\n // \"turnover24h\": \"5626085.23749999\",\n // \"volume24h\": \"169.317\",\n // \"fundingRate\": \"0\",\n // \"predictedFundingRate\": \"0\",\n // \"nextFundingTime\": \"10:00:00\",\n // \"tradeCount\": 100\n // }\n //\n const timestamp = this.milliseconds ();\n const marketId = this.safeString (interest, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = this.safeSymbol (marketId, market);\n return this.safeOpenInterest ({\n 'symbol': symbol,\n 'openInterestAmount': this.safeString (interest, 'openInterest'),\n 'openInterestValue': undefined,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'info': interest,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": \"1234\",\n \"clientId\": \"1234\",\n \"accountId\": \"12345\",\n \"symbol\": \"BTC-USD\",\n \"side\": \"SELL\",\n \"price\": \"18000\",\n \"limitFee\": \"100\",\n \"fee\": \"100\",\n \"triggerPrice\": \"1.2\",\n \"trailingPercent\": \"0.12\",\n \"size\": \"100\",\n \"remainingSize\": \"100\",\n \"type\": \"LIMIT\",\n \"createdAt\": 1647502440973,\n \"updatedTime\": 1647502440973,\n \"expiresAt\": 1647502440973,\n \"status\": \"PENDING\",\n \"timeInForce\": \"GOOD_TIL_CANCEL\",\n \"postOnly\": false,\n \"reduceOnly\": false,\n \"stopPnl\": false,\n \"latestMatchFillPrice\": \"reason\",\n \"cumMatchFillSize\": \"0.1\",\n \"cumMatchFillValue\": \"1000\",\n \"cumMatchFillFee\": \"1\",\n \"cumSuccessFillSize\": \"0.1\",\n \"cumSuccessFillValue\": \"1000\",\n \"cumSuccessFillFee\": \"1\",\n \"triggerPriceType\": \"INDEX\",\n \"isOpenTpslOrder\": true,\n \"isSetOpenTp\": true,\n \"isSetOpenSl\": false,\n \"openTpParam\": {\n \"side\": \"SELL\",\n \"price\": \"18000\",\n \"limitFee\": \"100\",\n \"clientOrderId\": \"111100\",\n \"triggerPrice\": \"1.2\",\n \"trailingPercent\": \"0.12\",\n \"size\": \"100\"\n },\n \"openSlParam\": {\n \"side\": \"SELL\",\n \"price\": \"18000\",\n \"limitFee\": \"100\",\n \"clientOrderId\": \"111100\",\n \"triggerPrice\": \"1.2\",\n \"trailingPercent\": \"0.12\",\n \"size\": \"100\"\n }\n }"
],
"line_end" => 1225,
"line_start" => 1126,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "clientOrderId"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "lastTradeTimestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "lastUpdateTimestamp",
"value" => "lastUpdateTimestamp"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseOrderStatus (status)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "this.parseOrderType (orderType)"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "this.parseTimeInForce (this.safeString (order, 'timeInForce'))"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "this.safeBool (order, 'postOnly')"
},
%{
"comment" => nil,
"key" => "reduceOnly",
"value" => "this.safeBool (order, 'reduceOnly')"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "this.safeString (order, 'triggerPrice')"
},
%{
"comment" => nil,
"key" => "takeProfitPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "stopLossPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remaining"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "{\n 'cost': this.safeString (order, 'fee'),\n 'currency': market['settleId'],\n }"
},
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "this.safeString (order, 'fee')"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "market['settleId']"
}
],
"name" => "parseOrder",
"signature" => "parseOrder (order: Dict, market: Market = undefined): Order",
"source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // {\n // \"id\": \"1234\",\n // \"clientId\": \"1234\",\n // \"accountId\": \"12345\",\n // \"symbol\": \"BTC-USD\",\n // \"side\": \"SELL\",\n // \"price\": \"18000\",\n // \"limitFee\": \"100\",\n // \"fee\": \"100\",\n // \"triggerPrice\": \"1.2\",\n // \"trailingPercent\": \"0.12\",\n // \"size\": \"100\",\n // \"remainingSize\": \"100\",\n // \"type\": \"LIMIT\",\n // \"createdAt\": 1647502440973,\n // \"updatedTime\": 1647502440973,\n // \"expiresAt\": 1647502440973,\n // \"status\": \"PENDING\",\n // \"timeInForce\": \"GOOD_TIL_CANCEL\",\n // \"postOnly\": false,\n // \"reduceOnly\": false,\n // \"stopPnl\": false,\n // \"latestMatchFillPrice\": \"reason\",\n // \"cumMatchFillSize\": \"0.1\",\n // \"cumMatchFillValue\": \"1000\",\n // \"cumMatchFillFee\": \"1\",\n // \"cumSuccessFillSize\": \"0.1\",\n // \"cumSuccessFillValue\": \"1000\",\n // \"cumSuccessFillFee\": \"1\",\n // \"triggerPriceType\": \"INDEX\",\n // \"isOpenTpslOrder\": true,\n // \"isSetOpenTp\": true,\n // \"isSetOpenSl\": false,\n // \"openTpParam\": {\n // \"side\": \"SELL\",\n // \"price\": \"18000\",\n // \"limitFee\": \"100\",\n // \"clientOrderId\": \"111100\",\n // \"triggerPrice\": \"1.2\",\n // \"trailingPercent\": \"0.12\",\n // \"size\": \"100\"\n // },\n // \"openSlParam\": {\n // \"side\": \"SELL\",\n // \"price\": \"18000\",\n // \"limitFee\": \"100\",\n // \"clientOrderId\": \"111100\",\n // \"triggerPrice\": \"1.2\",\n // \"trailingPercent\": \"0.12\",\n // \"size\": \"100\"\n // }\n // }\n //\n const timestamp = this.safeInteger (order, 'createdAt');\n const orderId = this.safeString (order, 'id');\n const clientOrderId = this.safeString (order, 'clientId');\n const marketId = this.safeString (order, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n const price = this.safeString (order, 'price');\n const amount = this.safeString (order, 'size');\n const orderType = this.safeString (order, 'type');\n const status = this.safeString (order, 'status');\n const side = this.safeStringLower (order, 'side');\n // const average = this.omitZero (this.safeString (order, 'avg_fill_price'));\n const remaining = this.omitZero (this.safeString (order, 'remainingSize'));\n const lastUpdateTimestamp = this.safeInteger (order, 'updatedTime');\n return this.safeOrder ({\n 'id': orderId,\n 'clientOrderId': clientOrderId,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'lastUpdateTimestamp': lastUpdateTimestamp,\n 'status': this.parseOrderStatus (status),\n 'symbol': symbol,\n 'type': this.parseOrderType (orderType),\n 'timeInForce': this.parseTimeInForce (this.safeString (order, 'timeInForce')),\n 'postOnly': this.safeBool (order, 'postOnly'),\n 'reduceOnly': this.safeBool (order, 'reduceOnly'),\n 'side': side,\n 'price': price,\n 'triggerPrice': this.safeString (order, 'triggerPrice'),\n 'takeProfitPrice': undefined,\n 'stopLossPrice': undefined,\n 'average': undefined,\n 'amount': amount,\n 'filled': undefined,\n 'remaining': remaining,\n 'cost': undefined,\n 'trades': undefined,\n 'fee': {\n 'cost': this.safeString (order, 'fee'),\n 'currency': market['settleId'],\n },\n 'info': order,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1250,
"line_start" => 1237,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: Str)",
"source" => "parseOrderStatus (status: Str) {\n if (status !== undefined) {\n const statuses: Dict = {\n 'PENDING': 'open',\n 'OPEN': 'open',\n 'FILLED': 'filled',\n 'CANCELING': 'canceled',\n 'CANCELED': 'canceled',\n 'UNTRIGGERED': 'open',\n };\n return this.safeString (statuses, status, status);\n }\n return status;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1262,
"line_start" => 1252,
"mappings" => [],
"name" => "parseOrderType",
"signature" => "parseOrderType (type: Str)",
"source" => "parseOrderType (type: Str) {\n const types: Dict = {\n 'LIMIT': 'limit',\n 'MARKET': 'market',\n 'STOP_LIMIT': 'limit',\n 'STOP_MARKET': 'market',\n 'TAKE_PROFIT_LIMIT': 'limit',\n 'TAKE_PROFIT_MARKET': 'market',\n };\n return this.safeString (types, type, type);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"symbol\": \"BTC-USDT\",\n \"status\": \"\",\n \"side\": \"LONG\",\n \"size\": \"0.000\",\n \"entryPrice\": \"0.00\",\n \"exitPrice\": \"\",\n \"createdAt\": 1690366452416,\n \"updatedTime\": 1690366452416,\n \"fee\": \"0.000000\",\n \"fundingFee\": \"0.000000\",\n \"lightNumbers\": \"\",\n \"customInitialMarginRate\": \"0\"\n }"
],
"line_end" => 1946,
"line_start" => 1894,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "position"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (position, 'id')"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "entryPrice",
"value" => "this.safeString (position, 'entryPrice')"
},
%{
"comment" => nil,
"key" => "markPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "notional",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "collateral",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "unrealizedPnl",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "contracts",
"value" => "this.parseNumber (quantity)"
},
%{
"comment" => nil,
"key" => "contractSize",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "hedged",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "maintenanceMargin",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "maintenanceMarginPercentage",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "initialMargin",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "initialMarginPercentage",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "leverage",
"value" => "leverage"
},
%{
"comment" => nil,
"key" => "liquidationPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "marginRatio",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "marginMode",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "undefined"
}
],
"name" => "parsePosition",
"signature" => "parsePosition (position: Dict, market: Market = undefined)",
"source" => "parsePosition (position: Dict, market: Market = undefined) {\n //\n // {\n // \"symbol\": \"BTC-USDT\",\n // \"status\": \"\",\n // \"side\": \"LONG\",\n // \"size\": \"0.000\",\n // \"entryPrice\": \"0.00\",\n // \"exitPrice\": \"\",\n // \"createdAt\": 1690366452416,\n // \"updatedTime\": 1690366452416,\n // \"fee\": \"0.000000\",\n // \"fundingFee\": \"0.000000\",\n // \"lightNumbers\": \"\",\n // \"customInitialMarginRate\": \"0\"\n // }\n const marketId = this.safeString (position, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n const side = this.safeStringLower (position, 'side');\n const quantity = this.safeString (position, 'size');\n const timestamp = this.safeInteger (position, 'updatedTime');\n let leverage = 20;\n const customInitialMarginRate = this.safeStringN (position, [ 'customInitialMarginRate', 'customImr' ], '0');\n if (this.precisionFromString (customInitialMarginRate) !== 0) {\n leverage = this.parseToInt (Precise.stringDiv ('1', customInitialMarginRate, 4));\n }\n return this.safePosition ({\n 'info': position,\n 'id': this.safeString (position, 'id'),\n 'symbol': symbol,\n 'entryPrice': this.safeString (position, 'entryPrice'),\n 'markPrice': undefined,\n 'notional': undefined,\n 'collateral': undefined,\n 'unrealizedPnl': undefined,\n 'side': side,\n 'contracts': this.parseNumber (quantity),\n 'contractSize': undefined,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'hedged': undefined,\n 'maintenanceMargin': undefined,\n 'maintenanceMarginPercentage': undefined,\n 'initialMargin': undefined,\n 'initialMarginPercentage': undefined,\n 'leverage': leverage,\n 'liquidationPrice': undefined,\n 'marginRatio': undefined,\n 'marginMode': undefined,\n 'percentage': undefined,\n });\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"symbol\": \"BTCUSDT\",\n \"price24hPcnt\": \"0.450141\",\n \"lastPrice\": \"43511.50\",\n \"highPrice24h\": \"43513.50\",\n \"lowPrice24h\": \"29996.00\",\n \"markPrice\": \"43513.50\",\n \"indexPrice\": \"40828.94\",\n \"openInterest\": \"2036854775808\",\n \"turnover24h\": \"5626085.23749999\",\n \"volume24h\": \"169.317\",\n \"fundingRate\": \"0\",\n \"predictedFundingRate\": \"0\",\n \"nextFundingTime\": \"10:00:00\",\n \"tradeCount\": 100\n }"
],
"line_end" => 765,
"line_start" => 712,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "high",
"value" => "high"
},
%{
"comment" => nil,
"key" => "low",
"value" => "low"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "open",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "close",
"value" => "last"
},
%{
"comment" => nil,
"key" => "last",
"value" => "last"
},
%{
"comment" => nil,
"key" => "previousClose",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "change",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "percentage"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "baseVolume"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "quoteVolume"
},
%{
"comment" => nil,
"key" => "markPrice",
"value" => "this.safeString (ticker, 'markPrice')"
},
%{
"comment" => nil,
"key" => "indexPrice",
"value" => "this.safeString (ticker, 'indexPrice')"
},
%{
"comment" => nil,
"key" => "info",
"value" => "ticker"
}
],
"name" => "parseTicker",
"signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker",
"source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // {\n // \"symbol\": \"BTCUSDT\",\n // \"price24hPcnt\": \"0.450141\",\n // \"lastPrice\": \"43511.50\",\n // \"highPrice24h\": \"43513.50\",\n // \"lowPrice24h\": \"29996.00\",\n // \"markPrice\": \"43513.50\",\n // \"indexPrice\": \"40828.94\",\n // \"openInterest\": \"2036854775808\",\n // \"turnover24h\": \"5626085.23749999\",\n // \"volume24h\": \"169.317\",\n // \"fundingRate\": \"0\",\n // \"predictedFundingRate\": \"0\",\n // \"nextFundingTime\": \"10:00:00\",\n // \"tradeCount\": 100\n // }\n //\n const timestamp = this.milliseconds ();\n const marketId = this.safeString (ticker, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = this.safeSymbol (marketId, market);\n const last = this.safeString (ticker, 'lastPrice');\n const percentage = this.safeString (ticker, 'price24hPcnt');\n const quoteVolume = this.safeString (ticker, 'turnover24h');\n const baseVolume = this.safeString (ticker, 'volume24h');\n const high = this.safeString (ticker, 'highPrice24h');\n const low = this.safeString (ticker, 'lowPrice24h');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': high,\n 'low': low,\n 'bid': undefined,\n 'bidVolume': undefined,\n 'ask': undefined,\n 'askVolume': undefined,\n 'vwap': undefined,\n 'open': undefined,\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': percentage,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': quoteVolume,\n 'markPrice': this.safeString (ticker, 'markPrice'),\n 'indexPrice': this.safeString (ticker, 'indexPrice'),\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1235,
"line_start" => 1227,
"mappings" => [],
"name" => "parseTimeInForce",
"signature" => "parseTimeInForce (timeInForce: Str)",
"source" => "parseTimeInForce (timeInForce: Str) {\n const timeInForces: Dict = {\n 'GOOD_TIL_CANCEL': 'GOOD_TIL_CANCEL',\n 'FILL_OR_KILL': 'FILL_OR_KILL',\n 'IMMEDIATE_OR_CANCEL': 'IMMEDIATE_OR_CANCEL',\n 'POST_ONLY': 'POST_ONLY',\n };\n return this.safeString (timeInForces, timeInForce, undefined);\n }"
},
%{
"comment" => nil,
"examples" => [
"[\n {\n \"i\": \"993f7f85-9215-5723-9078-2186ae140847\",\n \"p\": \"96534.3\",\n \"S\": \"Sell\",\n \"v\": \"0.261\",\n \"s\": \"BTCUSDT\",\n \"T\": 1739118072710\n }\n ]"
],
"line_end" => 1001,
"line_start" => 964,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "order",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "priceString"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // [\n // {\n // \"i\": \"993f7f85-9215-5723-9078-2186ae140847\",\n // \"p\": \"96534.3\",\n // \"S\": \"Sell\",\n // \"v\": \"0.261\",\n // \"s\": \"BTCUSDT\",\n // \"T\": 1739118072710\n // }\n // ]\n //\n const marketId = this.safeStringN (trade, [ 's', 'symbol' ]);\n market = this.safeMarket (marketId, market);\n const id = this.safeStringN (trade, [ 'i', 'id' ]);\n const timestamp = this.safeIntegerN (trade, [ 't', 'T', 'createdAt' ]);\n const priceString = this.safeStringN (trade, [ 'p', 'price' ]);\n const amountString = this.safeStringN (trade, [ 'v', 'size' ]);\n const side = this.safeStringLowerN (trade, [ 'S', 'side' ]);\n const type = this.safeStringN (trade, [ 'type' ]);\n const fee = this.safeStringN (trade, [ 'fee' ]);\n return this.safeTrade ({\n 'info': trade,\n 'id': id,\n 'order': undefined,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': market['symbol'],\n 'type': type,\n 'takerOrMaker': undefined,\n 'side': side,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'fee': fee,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1573,
"line_start" => 1557,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "transfer"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeStringN (transfer, [ 'transferId', 'id' ])"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "this.safeCurrencyCode (currencyId, currency)"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.safeNumber (transfer, 'amount')"
},
%{
"comment" => nil,
"key" => "fromAccount",
"value" => "fromAccount"
},
%{
"comment" => nil,
"key" => "toAccount",
"value" => "toAccount"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.safeString (transfer, 'status')"
}
],
"name" => "parseTransfer",
"signature" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry",
"source" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry {\n const currencyId = this.safeString (transfer, 'coin');\n const timestamp = this.safeInteger (transfer, 'timestamp');\n const fromAccount = this.safeString (transfer, 'fromAccount');\n const toAccount = this.safeString (transfer, 'toAccount');\n return {\n 'info': transfer,\n 'id': this.safeStringN (transfer, [ 'transferId', 'id' ]),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'currency': this.safeCurrencyCode (currencyId, currency),\n 'amount': this.safeNumber (transfer, 'amount'),\n 'fromAccount': fromAccount,\n 'toAccount': toAccount,\n 'status': this.safeString (transfer, 'status'),\n };\n }"
}
],
path_prefix: "",
pro: true,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 20,
period: 1000,
requests: 50,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/account"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/account-balance"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/fills"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/funding"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/historical-pnl"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/history-orders"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/open-orders"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/order"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/order-by-client-order-id"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/order-fills"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/transfer"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/transfers"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v3/contract-transfer-out"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v3/delete-client-order-id"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v3/delete-open-orders"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v3/delete-order"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v3/order"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v3/set-initial-margin-rate"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/v3/transfer-out"
}
],
public: [
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/data/all-ticker-info"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/depth"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/history-funding"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/klines"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/symbols"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/ticker"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/time"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/v3/trades"
}
]
},
required_credentials: %{
api_key: true,
password: true,
secret: true,
uid: false
},
requires_eddsa: false,
response_error: nil,
signing: %{
api_key_header: "APEX-API-KEY",
confidence: :medium,
has_passphrase: true,
passphrase_header: "APEX-PASSPHRASE",
pattern: :hmac_sha256_passphrase_signed,
signature_encoding: :base64,
signature_header: "APEX-SIGNATURE",
timestamp_header: "APEX-TIMESTAMP"
},
spec_format_version: 1,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{
"max" => 50,
"min" => 0.001
},
"cost" => %{},
"price" => %{}
},
sample_precision: %{
"amount" => 0.001,
"price" => 0.1
},
swap: %{
base: "BTC",
base_id: "BTC",
case: :upper,
contract: true,
contract_size: 0.001,
id: "BTC-USDT",
inverse: false,
limits: %{
"amount" => %{
"max" => 50,
"min" => 0.001
},
"cost" => %{},
"leverage" => %{
"max" => 100,
"min" => 1
},
"price" => %{}
},
linear: true,
maker: 0.0005,
precision: %{
"amount" => 0.001,
"price" => 0.1
},
quote: "USDT",
quote_id: "50001",
separator: "-",
settle: "USDT",
settle_id: "USDT",
symbol: "BTC/USDT:USDT",
taker: 0.0002
}
},
symbol_patterns: %{
swap: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :implicit,
separator: "-",
suffix: nil
}
},
timeframes: %{
"12h" => "720",
"15m" => "15",
"1M" => "M",
"1d" => "D",
"1h" => "60",
"1m" => "1",
"1w" => "W",
"2h" => "120",
"30m" => "30",
"4h" => "240",
"5m" => "5",
"6h" => "360"
},
url_strategy: %{
detected_from: "api_structure",
note: "paths_already_versioned",
pattern: :version_in_path,
prefix: nil
},
urls: %{
api: "https://omni.apex.exchange/api",
api_sections: %{
"private" => "https://omni.apex.exchange/api",
"public" => "https://omni.apex.exchange/api"
},
doc: "https://api-docs.pro.apex.exchange",
other: nil,
sandbox: %{
"private" => "https://testnet.omni.apex.exchange/api",
"public" => "https://testnet.omni.apex.exchange/api"
},
www: "https://apex.exchange/"
},
version: "v3",
ws: %{
auth: %{
algorithm: :sha256,
encoding: :base64,
market_specific: false,
message_format: :op_args,
op_field: "op",
op_value: "login",
pattern: :iso_passphrase,
payload_format: "timestamp + method + path",
requires_passphrase: true,
timestamp_unit: :seconds
},
channel_templates: %{
watch_my_trades: %{
auth_required: true,
channel_name: "myTrades",
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
},
watch_ohlcv: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
},
watch_ohlcv_for_symbols: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
},
watch_order_book: %{
channel_name: "orderBook",
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
},
watch_order_book_for_symbols: %{
channel_name: "orderBook",
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
},
watch_orders: %{
auth_required: true,
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
},
watch_positions: %{
auth_required: true,
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
},
watch_ticker: %{
channel_name: "instrumentInfo",
market_id_format: :native,
params: [],
pattern: :topic_based,
separator: "."
},
watch_tickers: %{
channel_name: "instrumentInfo",
market_id_format: :native,
params: [],
pattern: :topic_based,
separator: "."
},
watch_topics: %{
market_id_format: :native,
params: [],
pattern: :topic_based,
separator: "."
},
watch_trades: %{
channel_name: "recentlyTrade",
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
},
watch_trades_for_symbols: %{
channel_name: "recentlyTrade",
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :topic_based,
separator: "."
}
},
has: %{
watch_balance: false,
watch_bids_asks: nil,
watch_liquidations: nil,
watch_liquidations_for_symbols: nil,
watch_my_liquidations: nil,
watch_my_liquidations_for_symbols: nil,
watch_my_trades: true,
watch_ohlcv: true,
watch_ohlcv_for_symbols: true,
watch_order_book: true,
watch_order_book_for_symbols: true,
watch_orders: true,
watch_orders_for_symbols: nil,
watch_position: nil,
watch_positions: true,
watch_status: nil,
watch_ticker: true,
watch_tickers: true,
watch_trades: true,
watch_trades_for_symbols: false
},
hostname: "omni.apex.exchange",
message_patterns: [
%{
args_field: "args",
format: :op,
keys: [
"args",
"op"
],
kind_field: "op",
kind_value: "login",
sources: [
:send,
:watch
]
},
%{
args_field: "args",
format: :op,
keys: [
"args",
"op"
],
kind_field: "op",
kind_value: "ping",
sources: [
:ping
]
},
%{
args_field: "args",
format: :op,
keys: [
"args",
"callerMethodName",
"op"
],
kind_field: "op",
kind_value: "subscribe",
sources: [
:send,
:watch_multiple
]
},
%{
args_field: "args",
format: :op,
keys: [
"args",
"op"
],
kind_field: "op",
kind_value: "subscribe",
sources: [
:send,
:watch_multiple
]
}
],
streaming: %{
keep_alive: 18000
},
subscription_config: %{
args_field: "args",
args_format: :string_list,
market_id_format: :native,
op_field: "op",
separator: "."
},
subscription_pattern: :op_subscribe,
test_urls: %{
"private" => "wss://qa-quote.omni.apex.exchange/realtime_private?v=2",
"public" => "wss://qa-quote.omni.apex.exchange/realtime_public?v=2"
},
urls: %{
"private" => "wss://quote.omni.apex.exchange/realtime_private?v=2",
"public" => "wss://quote.omni.apex.exchange/realtime_public?v=2"
},
watch_methods: [
"watchMyTrades",
"watchOHLCV",
"watchOHLCVForSymbols",
"watchOrderBook",
"watchOrderBookForSymbols",
"watchOrders",
"watchPositions",
"watchTicker",
"watchTickers",
"watchTopics",
"watchTrades",
"watchTradesForSymbols"
]
}
}