Current section
Files
Jump to
Current section
Files
priv/specs/extracted/coinmetro.exs
# Coinmetro Exchange Specification
#
# Auto-generated by: mix ccxt.extract coinmetro
# 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: :supported,
comment: nil,
countries: [
"EE"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 22,
"coveragePercent" => 100,
"enabledMethods" => 22,
"excluded" => [],
"excludedMethods" => 0,
"extractableMethods" => 22,
"failures" => []
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :put,
name: :borrow_cross_margin,
param_mappings: %{
"amount" => "BTC"
},
params: [
:code,
:amount
],
path: "/users/margin/collateral",
response_transformer: {:extract_path, ["result"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :put,
name: :cancel_order,
param_mappings: %{
"id" => "orderID"
},
params: [
:id,
:symbol
],
path: "/exchange/orders/cancel/{orderID}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"buyingCurrency" => "BTC",
"orderType" => "limit",
"sellingCurrency" => "USDT",
"sellingQty" => "50"
},
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"amount" => "buyingQty"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/exchange/orders/create",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"buyingCurrency" => "BTC",
"orderType" => "market",
"sellingCurrency" => "USDT"
},
market_type: :spot,
method: :post,
name: :create_market_order,
param_mappings: %{
"amount" => "buyingQty"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/exchange/orders/create",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"buyingCurrency" => "BTC",
"sellingCurrency" => "USDT",
"sellingQty" => "50"
},
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"amount" => "buyingQty",
"type" => "orderType"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/exchange/orders/create",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"buyingCurrency" => "BTC",
"orderType" => "limit",
"sellingCurrency" => "USDT",
"sellingQty" => "50",
"triggerDirection" => "below"
},
market_type: :swap,
method: :post,
name: :create_stop_limit_order,
param_mappings: %{
"amount" => "buyingQty",
"triggerPrice" => "stopPrice"
},
params: [
:symbol,
:side,
:amount,
:price,
:triggerPrice
],
path: "/exchange/orders/create",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"buyingCurrency" => "BTC",
"orderType" => "market",
"sellingCurrency" => "USDT",
"triggerDirection" => "below"
},
market_type: :swap,
method: :post,
name: :create_stop_market_order,
param_mappings: %{
"amount" => "buyingQty",
"triggerPrice" => "stopPrice"
},
params: [
:symbol,
:side,
:amount,
:triggerPrice
],
path: "/exchange/orders/create",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"buyingCurrency" => "BTC",
"sellingCurrency" => "USDT",
"sellingQty" => "50",
"triggerDirection" => "below"
},
market_type: :swap,
method: :post,
name: :create_stop_order,
param_mappings: %{
"amount" => "buyingQty",
"triggerPrice" => "stopPrice",
"type" => "orderType"
},
params: [
:symbol,
:type,
:side,
:amount,
:price,
:triggerPrice
],
path: "/exchange/orders/create",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/users/wallets",
response_transformer: {:extract_path, ["list"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_bids_asks,
param_mappings: %{},
params: [
:symbols
],
path: "/exchange/prices",
response_transformer: {:extract_path, ["latestPrices"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.67,
market_type: :spot,
method: :get,
name: :fetch_canceled_and_closed_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/exchange/orders/history/{since}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_currencies,
param_mappings: %{},
params: [],
path: "/assets",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 3,
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:limit
],
path: "/exchange/book/{pair}",
response_transformer: {:extract_path, ["book"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.67,
default_params: %{
"since" => ""
},
market_type: :spot,
method: :get,
name: :fetch_ledger,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/users/wallets/history/{since}",
response_transformer: {:extract_path, ["list"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/markets",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.67,
default_params: %{
"since" => 0
},
market_type: :spot,
method: :get,
name: :fetch_my_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/exchange/fills/{since}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 3,
default_params: %{
"to" => "<generated>"
},
market_type: :spot,
method: :get,
name: :fetch_ohlcv,
param_mappings: %{
"since" => "from",
"symbol" => "pair"
},
params: [
:symbol,
:timeframe,
:since,
:limit
],
path: "/exchange/candles/{pair}/{timeframe}/{from}/{to}",
response_transformer: {:extract_path, ["candleHistory"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_open_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/exchange/orders/active",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_order,
param_mappings: %{
"id" => "orderID"
},
params: [
:id,
:symbol
],
path: "/exchange/orders/status/{orderID}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 3,
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:limit
],
path: "/exchange/book/{pair}",
response_transformer: {:extract_path_unwrap, ["book"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_tickers,
param_mappings: %{},
params: [
:symbols
],
path: "/exchange/prices",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 3,
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"since" => "from",
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/exchange/ticks/{pair}/{from}",
response_transformer: {:extract_path, ["tickHistory"]},
source: :intercepted
}
],
error_code_details: %{
"At least" => %{
description: "422 Unprocessable Entity {\"message\":\"At least 5 EUR per operation\"}",
type: :invalid_parameters
},
"Both buyingCurrency and sellingCurrency are required" => %{
description: "422 - \"Both buyingCurrency and sellingCurrency are required\"",
type: :invalid_order
},
"Expiration date is in the past or too near in the future" => %{
description: "422 Unprocessable Entity {\"message\":\"Expiration date is in the past or too near in the future\"}",
type: :invalid_order
},
"Forbidden" => %{
description: "403 Forbidden {\"message\":\"Forbidden\"}",
type: :access_restricted
},
"Insufficient balance" => %{
description: "422 - \"Insufficient balance\"",
type: :insufficient_balance
},
"Insufficient liquidity" => %{
description: "503 Service Unavailable {\"message\":\"Insufficient liquidity to fill the FOK order completely.\"}",
type: :invalid_order
},
"Insufficient order size" => %{
description: "422 Unprocessable Entity {\"message\":\"Insufficient order size - min 0.002 ETH\"}",
type: :invalid_order
},
"Invalid 'from'" => %{
description: "422 Unprocessable Entity {\"message\":\"Invalid 'from'\"}",
type: :invalid_parameters
},
"Invalid Stop Loss" => %{
description: "422 Unprocessable Entity {\"message\":\"Invalid Stop Loss!\"}",
type: :invalid_order
},
"Invalid buyingCurrency" => %{
description: "422 - \"Invalid buyingCurrency\"",
type: :invalid_order
},
"Invalid buyingQty" => %{
description: "422 - \"Invalid buyingQty\"",
type: :invalid_order
},
"Invalid quantity" => %{
description: "422 Unprocessable Entity {\"message\":\"Invalid quantity!\"}",
type: :invalid_order
},
"Invalid sellingCurrency" => %{
description: "422 - \"Invalid sellingCurrency\"",
type: :invalid_order
},
"Invalid sellingQty" => %{
description: "422 - \"Invalid sellingQty\"",
type: :invalid_order
},
"Invalid stop price!" => %{
description: "422 Unprocessable Entity {\"message\":\"Invalid stop price!\"}",
type: :invalid_order
},
"Not enough balance" => %{
description: "422 Unprocessable Entity {\"message\":\"Not enough balance!\"}",
type: :insufficient_balance
},
"Not enough margin" => %{
description: "Unprocessable Entity {\"message\":\"Not enough margin!\"}",
type: :insufficient_balance
},
"One and only one of buyingQty and sellingQty is required" => %{
description: "422 - \"One and only one of buyingQty and sellingQty is required\"",
type: :invalid_order
},
"Order Not Found" => %{
description: "404 Not Found {\"message\":\"Order Not Found\"}",
type: :order_not_found
},
"Server Timeout" => %{
description: "503 Service Unavailable {\"message\":\"Server Timeout!\"}",
type: :exchange_error
},
"This pair is disabled on margin" => %{
description: "422 Unprocessable Entity {\"message\":\"This pair is disabled on margin\"}",
type: :invalid_order
},
"Time in force has to be IOC or FOK for market orders" => %{
description: "422 Unprocessable Entity {\"message\":\"Time in force has to be IOC or FOK for market orders!\"}",
type: :invalid_order
},
"Too many attempts" => %{
description: "429 Too Many Requests {\"message\":\"Too many attempts. Try again in 3 seconds\"}",
type: :rate_limited
},
"accessing from a new IP" => %{
description: "403 Forbidden {\"message\":\"You're accessing from a new IP. Please check your email.\"}",
type: :access_restricted
},
"available to allocate as collateral" => %{
description: "403 Forbidden {\"message\":\"Insufficient EUR available to allocate as collateral\"}",
type: :insufficient_balance
},
"collateral is not allowed" => %{
description: "422 Unprocessable Entity {\"message\":\"DOGE collateral is not allowed\"}",
type: :invalid_parameters
},
"orderType missing" => %{
description: "422 Unprocessable Entity {\"message\":\"orderType missing!\"}",
type: :invalid_parameters
},
"since must be a millisecond timestamp" => %{
description: "422 Unprocessable Entity {\"message\":\"since must be a millisecond timestamp\"}",
type: :invalid_parameters
}
},
error_codes: %{
"At least" => :invalid_parameters,
"Both buyingCurrency and sellingCurrency are required" => :invalid_order,
"Expiration date is in the past or too near in the future" => :invalid_order,
"Forbidden" => :access_restricted,
"Insufficient balance" => :insufficient_balance,
"Insufficient liquidity" => :invalid_order,
"Insufficient order size" => :invalid_order,
"Invalid 'from'" => :invalid_parameters,
"Invalid Stop Loss" => :invalid_order,
"Invalid buyingCurrency" => :invalid_order,
"Invalid buyingQty" => :invalid_order,
"Invalid quantity" => :invalid_order,
"Invalid sellingCurrency" => :invalid_order,
"Invalid sellingQty" => :invalid_order,
"Invalid stop price!" => :invalid_order,
"Not enough balance" => :insufficient_balance,
"Not enough margin" => :insufficient_balance,
"One and only one of buyingQty and sellingQty is required" => :invalid_order,
"Order Not Found" => :order_not_found,
"Server Timeout" => :exchange_error,
"This pair is disabled on margin" => :invalid_order,
"Time in force has to be IOC or FOK for market orders" => :invalid_order,
"Too many attempts" => :rate_limited,
"accessing from a new IP" => :access_restricted,
"available to allocate as collateral" => :insufficient_balance,
"collateral is not allowed" => :invalid_parameters,
"orderType missing" => :invalid_parameters,
"since must be a millisecond timestamp" => :invalid_parameters
},
exceptions: %{
broad: %{
"At least" => :bad_request,
"Insufficient liquidity" => :invalid_order,
"Insufficient order size" => :invalid_order,
"Invalid Stop Loss" => :invalid_order,
"Invalid quantity" => :invalid_order,
"Invalid stop price!" => :invalid_order,
"Not enough balance" => :insufficient_funds,
"Not enough margin" => :insufficient_funds,
"Server Timeout" => :exchange_error,
"Time in force has to be IOC or FOK for market orders" => :invalid_order,
"Too many attempts" => :rate_limit_exceeded,
"accessing from a new IP" => :permission_denied,
"available to allocate as collateral" => :insufficient_funds,
"collateral is not allowed" => :bad_request,
"orderType missing" => :bad_request
},
exact: %{
"Both buyingCurrency and sellingCurrency are required" => :invalid_order,
"Expiration date is in the past or too near in the future" => :invalid_order,
"Forbidden" => :permission_denied,
"Insufficient balance" => :insufficient_funds,
"Invalid 'from'" => :bad_request,
"Invalid buyingCurrency" => :invalid_order,
"Invalid buyingQty" => :invalid_order,
"Invalid sellingCurrency" => :invalid_order,
"Invalid sellingQty" => :invalid_order,
"One and only one of buyingQty and sellingQty is required" => :invalid_order,
"Order Not Found" => :order_not_found,
"This pair is disabled on margin" => :bad_symbol,
"since must be a millisecond timestamp" => :bad_request
}
},
exchange_options: %{
"currenciesByIdForParseMarket" => nil,
"currencyIdsListForParseMarket" => [
"QRDO"
],
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"networksById" => %{}
},
extended_metadata: %{
fees_url: "https://help.coinmetro.com/hc/en-gb/articles/6844007317789-What-are-the-fees-on-Coinmetro-",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://github.com/ccxt/ccxt/assets/43336371/e86f87ec-6ba3-4410-962b-f7988c5db539",
referral_url: "https://go.coinmetro.com/?ref=crypto24"
},
extracted_metadata: %{
ccxt_version: "4.5.34"
},
features: %{
future: %{},
spot: %{
create_order: %{
attached_stop_loss_take_profit: %{
price: false
},
hedged: false,
iceberg: true,
leverage: false,
margin_mode: true,
market_buy_by_cost: true,
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: false
},
trailing: false,
trigger_direction: false,
trigger_price: true
},
fetch_my_trades: %{
days_back: 100000,
margin_mode: false,
symbol_required: false
},
fetch_ohlcv: %{
limit: 1000
},
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,
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
sandbox: true
},
swap: %{}
},
fees: %{
trading: %{
fee_side: "get",
maker: 0,
percentage: true,
taker: 0.001,
tier_based: false
}
},
handle_content_type_application_zip: nil,
handle_errors_source: "handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n if (response === undefined) {\n return undefined;\n }\n if ((code !== 200) && (code !== 201) && (code !== 202)) {\n const feedback = this.id + ' ' + body;\n const message = this.safeString(response, 'message');\n this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);\n throw new errors.ExchangeError(feedback);\n }\n return undefined;\n }",
has: %{
add_margin: false,
borrow_cross_margin: true,
borrow_isolated_margin: false,
borrow_margin: false,
c_o_r_s: false,
cancel_all_orders: 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_with_client_order_id: false,
cancel_orders_ws: false,
close_all_positions: false,
close_position: true,
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: false,
create_post_only_order_ws: false,
create_reduce_only_order: false,
create_reduce_only_order_ws: false,
create_stop_limit_order: true,
create_stop_limit_order_ws: false,
create_stop_loss_order: false,
create_stop_loss_order_ws: false,
create_stop_market_order: true,
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: false,
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: false,
fetch_balance: true,
fetch_balance_ws: false,
fetch_bids_asks: true,
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: true,
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: false,
fetch_funding_interval: false,
fetch_funding_intervals: false,
fetch_funding_rate: false,
fetch_funding_rate_history: false,
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: true,
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: false,
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: false,
fetch_order_with_client_order_id: false,
fetch_order_ws: false,
fetch_orders: false,
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: false,
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: false,
fetch_ticker_ws: false,
fetch_tickers: true,
fetch_tickers_ws: false,
fetch_time: false,
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: false,
fetch_transfers: false,
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: true,
option: false,
private_api: true,
public_api: true,
reduce_margin: false,
repay_cross_margin: false,
repay_isolated_margin: false,
sandbox: true,
set_leverage: false,
set_margin: false,
set_margin_mode: false,
set_position_mode: false,
sign_in: false,
spot: true,
swap: false,
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: false,
watch_ohlcv: false,
watch_ohlcv_for_symbols: false,
watch_order_book: false,
watch_order_book_for_symbols: false,
watch_orders: false,
watch_orders_for_symbols: false,
watch_position: false,
watch_positions: false,
watch_status: false,
watch_ticker: false,
watch_tickers: false,
watch_trades: false,
watch_trades_for_symbols: false,
withdraw: false,
ws: false
},
http_config: nil,
id: "coinmetro",
markets: nil,
name: "Coinmetro",
ohlcv_timestamp_resolution: :milliseconds,
options: %{
"currencies_by_id_for_parse_market" => nil,
"currency_ids_list_for_parse_market" => [
"QRDO"
]
},
order_mappings: %{
side_format: nil,
side_key: nil,
type_format: :lowercase,
type_key: "orderType"
},
param_mappings: %{
"amount" => "buyingQty",
"id" => "orderID",
"since" => "from",
"symbol" => "pair",
"triggerPrice" => "stopPrice",
"type" => "orderType"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [
"[\n {\n \"xcmLocks\": [],\n \"xcmLockAmounts\": [],\n \"refList\": [],\n \"balanceHistory\": [],\n \"_id\": \"5fecd3c998e75c2e4d63f7c3\",\n \"currency\": \"BTC\",\n \"label\": \"BTC\",\n \"userId\": \"5fecd3c97fbfed1521db23bd\",\n \"__v\": 0,\n \"balance\": 0.5,\n \"createdAt\": \"2020-12-30T19:23:53.646Z\",\n \"disabled\": false,\n \"updatedAt\": \"2020-12-30T19:23:53.653Z\",\n \"reserved\": 0,\n \"id\": \"5fecd3c998e75c2e4d63f7c3\"\n },\n ...\n ]"
],
"line_end" => 1122,
"line_start" => 1086,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (balances): Balances",
"source" => "parseBalance (balances): Balances {\n //\n // [\n // {\n // \"xcmLocks\": [],\n // \"xcmLockAmounts\": [],\n // \"refList\": [],\n // \"balanceHistory\": [],\n // \"_id\": \"5fecd3c998e75c2e4d63f7c3\",\n // \"currency\": \"BTC\",\n // \"label\": \"BTC\",\n // \"userId\": \"5fecd3c97fbfed1521db23bd\",\n // \"__v\": 0,\n // \"balance\": 0.5,\n // \"createdAt\": \"2020-12-30T19:23:53.646Z\",\n // \"disabled\": false,\n // \"updatedAt\": \"2020-12-30T19:23:53.653Z\",\n // \"reserved\": 0,\n // \"id\": \"5fecd3c998e75c2e4d63f7c3\"\n // },\n // ...\n // ]\n //\n const result: Dict = {\n 'info': balances,\n };\n for (let i = 0; i < balances.length; i++) {\n const balanceEntry = this.safeDict (balances, i, {});\n const currencyId = this.safeString (balanceEntry, 'currency');\n const code = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['total'] = this.safeString (balanceEntry, 'balance');\n account['used'] = this.safeString (balanceEntry, 'reserved');\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 916,
"line_start" => 906,
"mappings" => [],
"name" => "parseBidsAsks",
"signature" => "parseBidsAsks (bidasks, priceKey: IndexType = 0, amountKey: IndexType = 1, countOrIdKey: IndexType = 2)",
"source" => "parseBidsAsks (bidasks, priceKey: IndexType = 0, amountKey: IndexType = 1, countOrIdKey: IndexType = 2) {\n const prices = Object.keys (bidasks);\n const result = [];\n for (let i = 0; i < prices.length; i++) {\n const priceString = this.safeString (prices, i);\n const price = this.safeNumber (prices, i);\n const volume = this.safeNumber (bidasks, priceString);\n result.push ([ price, volume ]);\n }\n return result;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1293,
"line_start" => 1253,
"mappings" => [
%{
"comment" => nil,
"key" => "cost",
"value" => "feeCost"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "item"
},
%{
"comment" => nil,
"key" => "id",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "this.parse8601 (datetime)"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "datetime"
},
%{
"comment" => nil,
"key" => "direction",
"value" => "direction"
},
%{
"comment" => nil,
"key" => "account",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "referenceId",
"value" => "referenceId"
},
%{
"comment" => nil,
"key" => "referenceAccount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "currency"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "before",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "after",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "status",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
}
],
"name" => "parseLedgerEntry",
"signature" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry",
"source" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry {\n const datetime = this.safeString (item, 'timestamp');\n const currencyId = this.safeString (item, 'currencyId');\n item = this.omit (item, 'currencyId');\n currency = this.safeCurrency (currencyId, currency);\n const description = this.safeString (item, 'description', '');\n const [ type, referenceId ] = this.parseLedgerEntryDescription (description);\n const JSONdata = this.safeValue (item, 'JSONdata', {});\n const feeCost = this.safeString (JSONdata, 'fees');\n const fee = {\n 'cost': feeCost,\n 'currency': undefined,\n };\n let amount = this.safeString (item, 'amount');\n let direction = undefined;\n if (amount !== undefined) {\n if (Precise.stringLt (amount, '0')) {\n direction = 'out';\n amount = Precise.stringAbs (amount);\n } else if (Precise.stringGt (amount, '0')) {\n direction = 'in';\n }\n }\n return this.safeLedgerEntry ({\n 'info': item,\n 'id': undefined,\n 'timestamp': this.parse8601 (datetime),\n 'datetime': datetime,\n 'direction': direction,\n 'account': undefined,\n 'referenceId': referenceId,\n 'referenceAccount': undefined,\n 'type': type,\n 'currency': currency,\n 'amount': amount,\n 'before': undefined,\n 'after': undefined,\n 'status': undefined,\n 'fee': fee,\n }, currency) as LedgerEntry;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1312,
"line_start" => 1295,
"mappings" => [],
"name" => "parseLedgerEntryDescription",
"signature" => "parseLedgerEntryDescription (description)",
"source" => "parseLedgerEntryDescription (description) {\n let descriptionArray = [];\n if (description !== undefined) {\n descriptionArray = description.split (' ');\n }\n let type = undefined;\n let referenceId = undefined;\n const length = descriptionArray.length;\n if (length > 1) {\n type = this.parseLedgerEntryType (descriptionArray[0]);\n if (descriptionArray[1] !== '-') {\n referenceId = descriptionArray[1];\n } else {\n referenceId = this.safeString (descriptionArray, 2);\n }\n }\n return [ type, referenceId ];\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1321,
"line_start" => 1314,
"mappings" => [],
"name" => "parseLedgerEntryType",
"signature" => "parseLedgerEntryType (type)",
"source" => "parseLedgerEntryType (type) {\n const types: Dict = {\n 'Deposit': 'transaction',\n 'Withdraw': 'transaction',\n 'Order': 'trade',\n };\n return this.safeString (types, type, type);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1991,
"line_start" => 1980,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "this.safeCurrencyCode (currencyId, currency)"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "info"
}
],
"name" => "parseMarginLoan",
"signature" => "parseMarginLoan (info, currency: Currency = undefined)",
"source" => "parseMarginLoan (info, currency: Currency = undefined) {\n const currencyId = this.safeString (info, 'coin');\n return {\n 'id': undefined,\n 'currency': this.safeCurrencyCode (currencyId, currency),\n 'amount': undefined,\n 'symbol': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'info': info,\n };\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 537,
"line_start" => 475,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "base + '/' + quote"
},
%{
"comment" => nil,
"key" => "base",
"value" => "base"
},
%{
"comment" => nil,
"key" => "quote",
"value" => "quote"
},
%{
"comment" => nil,
"key" => "settle",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseId",
"value" => "baseId"
},
%{
"comment" => nil,
"key" => "quoteId",
"value" => "quoteId"
},
%{
"comment" => nil,
"key" => "settleId",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "'spot'"
},
%{
"comment" => nil,
"key" => "spot",
"value" => "true"
},
%{
"comment" => nil,
"key" => "margin",
"value" => "margin"
},
%{
"comment" => nil,
"key" => "swap",
"value" => "false"
},
%{
"comment" => nil,
"key" => "future",
"value" => "false"
},
%{
"comment" => nil,
"key" => "option",
"value" => "false"
},
%{
"comment" => nil,
"key" => "active",
"value" => "true"
},
%{
"comment" => nil,
"key" => "contract",
"value" => "false"
},
%{
"comment" => nil,
"key" => "linear",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "inverse",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "taker",
"value" => "this.safeNumber (tradingFees, 'taker')"
},
%{
"comment" => nil,
"key" => "maker",
"value" => "this.safeNumber (tradingFees, 'maker')"
},
%{
"comment" => nil,
"key" => "contractSize",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "expiry",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "expiryDatetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "strike",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "optionType",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "precision",
"value" => "{\n 'amount': basePrecisionAndLimits['precision'],\n 'price': this.parseNumber (this.parsePrecision (this.safeString (market, 'precision'))),\n }"
},
%{
"comment" => nil,
"key" => "limits",
"value" => "{\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': basePrecisionAndLimits['minLimit'],\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': quotePrecisionAndLimits['minLimit'],\n 'max': undefined,\n },\n }"
},
%{
"comment" => nil,
"key" => "created",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "market"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "basePrecisionAndLimits['precision']"
},
%{
"comment" => nil,
"key" => "price",
"value" => "this.parseNumber (this.parsePrecision (this.safeString (market, 'precision')))"
},
%{
"comment" => nil,
"key" => "leverage",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "{\n 'min': basePrecisionAndLimits['minLimit'],\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "price",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "{\n 'min': quotePrecisionAndLimits['minLimit'],\n 'max': undefined,\n }"
}
],
"name" => "parseMarket",
"signature" => "parseMarket (market: Dict): Market",
"source" => "parseMarket (market: Dict): Market {\n const id = this.safeString (market, 'pair');\n const parsedMarketId = this.parseMarketId (id);\n const baseId = this.safeString (parsedMarketId, 'baseId');\n const quoteId = this.safeString (parsedMarketId, 'quoteId');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n const basePrecisionAndLimits = this.parseMarketPrecisionAndLimits (baseId);\n const quotePrecisionAndLimits = this.parseMarketPrecisionAndLimits (quoteId);\n const margin = this.safeBool (market, 'margin', false);\n const tradingFees = this.safeValue (this.fees, 'trading', {});\n return this.safeMarketStructure ({\n 'id': id,\n 'symbol': base + '/' + quote,\n 'base': base,\n 'quote': quote,\n 'settle': undefined,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': undefined,\n 'type': 'spot',\n 'spot': true,\n 'margin': margin,\n 'swap': false,\n 'future': false,\n 'option': false,\n 'active': true,\n 'contract': false,\n 'linear': undefined,\n 'inverse': undefined,\n 'taker': this.safeNumber (tradingFees, 'taker'),\n 'maker': this.safeNumber (tradingFees, 'maker'),\n 'contractSize': undefined,\n 'expiry': undefined,\n 'expiryDatetime': undefined,\n 'strike': undefined,\n 'optionType': undefined,\n 'precision': {\n 'amount': basePrecisionAndLimits['precision'],\n 'price': this.parseNumber (this.parsePrecision (this.safeString (market, 'precision'))),\n },\n 'limits': {\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': basePrecisionAndLimits['minLimit'],\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': quotePrecisionAndLimits['minLimit'],\n 'max': undefined,\n },\n },\n 'created': undefined,\n 'info': market,\n });\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 588,
"line_start" => 539,
"mappings" => [],
"name" => "parseMarketId",
"signature" => "parseMarketId (marketId)",
"source" => "parseMarketId (marketId) {\n let baseId = undefined;\n let quoteId = undefined;\n const currencyIds = this.safeValue (this.options, 'currencyIdsListForParseMarket', []);\n // Bubble sort by length (longest first)\n const currencyIdsLength = currencyIds.length;\n for (let i = 0; i < currencyIdsLength; i++) {\n for (let j = 0; j < currencyIdsLength - i - 1; j++) {\n const a = currencyIds[j];\n const b = currencyIds[j + 1];\n if (a.length < b.length) {\n currencyIds[j] = b;\n currencyIds[j + 1] = a;\n }\n }\n }\n for (let i = 0; i < currencyIds.length; i++) {\n const currencyId = currencyIds[i];\n const entryIndex = marketId.indexOf (currencyId);\n if (entryIndex === 0) {\n const restId = marketId.replace (currencyId, '');\n if (this.inArray (restId, currencyIds)) {\n if (entryIndex === 0) {\n baseId = currencyId;\n quoteId = restId;\n } else {\n baseId = restId;\n quoteId = currencyId;\n }\n break;\n }\n }\n }\n if (baseId === undefined || quoteId === undefined) {\n // https://github.com/ccxt/ccxt/issues/26820\n if (marketId.endsWith ('USDT')) {\n baseId = marketId.replace ('USDT', '');\n quoteId = 'USDT';\n }\n if (marketId.endsWith ('USD')) {\n baseId = marketId.replace ('USD', '');\n quoteId = 'USD';\n }\n }\n const result: Dict = {\n 'baseId': baseId,\n 'quoteId': quoteId,\n };\n return result;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 601,
"line_start" => 590,
"mappings" => [
%{
"comment" => nil,
"key" => "precision",
"value" => "this.safeNumber (currency, 'precision')"
},
%{
"comment" => nil,
"key" => "minLimit",
"value" => "minLimit"
}
],
"name" => "parseMarketPrecisionAndLimits",
"signature" => "parseMarketPrecisionAndLimits (currencyId)",
"source" => "parseMarketPrecisionAndLimits (currencyId) {\n const currencies = this.safeValue (this.options, 'currenciesByIdForParseMarket', {});\n const currency = this.safeValue (currencies, currencyId, {});\n const limits = this.safeValue (currency, 'limits', {});\n const amountLimits = this.safeValue (limits, 'amount', {});\n const minLimit = this.safeNumber (amountLimits, 'min');\n const result: Dict = {\n 'precision': this.safeNumber (currency, 'precision'),\n 'minLimit': minLimit,\n };\n return result;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 681,
"line_start" => 672,
"mappings" => [],
"name" => "parseOHLCV",
"signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV",
"source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n return [\n this.safeInteger (ohlcv, 'timestamp'),\n this.safeNumber (ohlcv, 'o'),\n this.safeNumber (ohlcv, 'h'),\n this.safeNumber (ohlcv, 'l'),\n this.safeNumber (ohlcv, 'c'),\n this.safeNumber (ohlcv, 'v'),\n ];\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"userID\": \"65671262d93d9525ac009e36\",\n \"orderID\": \"65671262d93d9525ac009e36170257448481749b7ee2893bafec2\",\n \"orderType\": \"market\",\n \"buyingCurrency\": \"ETH\",\n \"sellingCurrency\": \"USDC\",\n \"buyingQty\": 0.002,\n \"timeInForce\": 4,\n \"boughtQty\": 0.002,\n \"soldQty\": 4.587,\n \"creationTime\": 1702574484829,\n \"seqNumber\": 10874285330,\n \"firstFillTime\": 1702574484831,\n \"lastFillTime\": 1702574484831,\n \"fills\": [\n {\n \"seqNumber\": 10874285329,\n \"timestamp\": 1702574484831,\n \"qty\": 0.002,\n \"price\": 2293.5,\n \"side\": \"buy\"\n }\n ],\n \"completionTime\": 1702574484831,\n \"takerQty\": 0.002\n }",
"{\n \"userID\": \"65671262d93d9525ac009e36\",\n \"orderID\": \"65671262d93d9525ac009e3617026635256739c996fe17d7cd5d4\",\n \"orderType\": \"limit\",\n \"buyingCurrency\": \"ETH\",\n \"sellingCurrency\": \"USDC\",\n \"fillStyle\": \"sell\",\n \"orderPlatform\": \"trade-v3\",\n \"timeInForce\": 1,\n \"buyingQty\": 0.005655,\n \"sellingQty\": 11.31,\n \"boughtQty\": 0,\n \"soldQty\": 0,\n \"creationTime\": 1702663525713,\n \"seqNumber\": 10885528683,\n \"fees\": 0,\n \"fills\": [],\n \"isAncillary\": false,\n \"margin\": false,\n \"trade\": false\n }",
"{\n \"userID\": \"65671262d93d9525ac009e36\",\n \"orderID\": \"65671262d93d9525ac009e36170257061073952c6423a8c5b4d6c\",\n \"orderType\": \"market\",\n \"buyingCurrency\": \"ETH\",\n \"sellingCurrency\": \"USDC\",\n \"buyingQty\": 0.002,\n \"timeInForce\": 4,\n \"boughtQty\": 0.002,\n \"soldQty\": 4.564,\n \"creationTime\": 1702570610746,\n \"seqNumber\": 10873722344,\n \"firstFillTime\": 1702570610747,\n \"lastFillTime\": 1702570610747,\n \"fills\": [\n {\n \"_id\": \"657b31d360a9542449381bdc\",\n \"seqNumber\": 10873722343,\n \"timestamp\": 1702570610747,\n \"qty\": 0.002,\n \"price\": 2282,\n \"side\": \"buy\"\n }\n ],\n \"completionTime\": 1702570610747,\n \"takerQty\": 0.002,\n \"fees\": 0.000002,\n \"isAncillary\": false,\n \"margin\": false,\n \"trade\": false,\n \"canceled\": false,\n \"__v\": 0\n }",
"{\n \"userData\": {\n \"takeProfit\": 1700,\n \"stopLoss\": 2100\n },\n \"_id\": \"658201d060a95424499394a2\",\n \"seqNumber\": 10925300213,\n \"orderType\": \"limit\",\n \"buyingCurrency\": \"EUR\",\n \"sellingCurrency\": \"ETH\",\n \"userID\": \"65671262d93d9525ac009e36\",\n \"closedQty\": 0.03,\n \"sellingQty\": 0.03,\n \"buyingQty\": 58.8,\n \"creationTime\": 1703015281205,\n \"margin\": true,\n \"timeInForce\": 1,\n \"boughtQty\": 59.31,\n \"orderID\": \"65671262d93d9525ac009e3617030152811996e5b352556d3d7d8\",\n \"lastFillTime\": 1703015281206,\n \"soldQty\": 0.03,\n \"closedTime\": 1703015488488,\n \"closedVal\": 59.375,\n \"trade\": true,\n \"takerQty\": 59.31,\n \"firstFillTime\": 1703015281206,\n \"completionTime\": 1703015281206,\n \"fills\": [\n {\n \"_id\": \"658201d060a95424499394a3\",\n \"seqNumber\": 10925300212,\n \"side\": \"sell\",\n \"price\": 1977,\n \"qty\": 0.03,\n \"timestamp\": 1703015281206\n },\n {\n \"_id\": \"658201d060a95424499394a4\",\n \"seqNumber\": 10925321178,\n \"timestamp\": 1703015488483,\n \"qty\": 0.03,\n \"price\": 1979.1666666666667,\n \"side\": \"buy\"\n }\n ],\n \"fees\": 0.11875000200000001,\n \"settledQtys\": {\n \"ETH\": -0.000092842104710025\n },\n \"isAncillary\": false,\n \"canceled\": false\n }",
"{\n \"_id\": \"657b4e6d60a954244939ac6f\",\n \"userID\": \"65671262d93d9525ac009e36\",\n \"orderID\": \"65671262d93d9525ac009e361702576531985b78465468b9cc544\",\n \"orderType\": \"market\",\n \"buyingCurrency\": \"ETH\",\n \"sellingCurrency\": \"USDC\",\n \"buyingQty\": 0.004,\n \"timeInForce\": 4,\n \"boughtQty\": 0.004,\n \"soldQty\": 9.236,\n \"creationTime\": 1702576531995,\n \"seqNumber\": 10874644062,\n \"firstFillTime\": 1702576531995,\n \"lastFillTime\": 1702576531995,\n \"fills\": [\n {\n \"_id\": \"657b4e6d60a954244939ac70\",\n \"seqNumber\": 10874644061,\n \"timestamp\": 1702576531995,\n \"qty\": 0.004,\n \"price\": 2309,\n \"side\": \"buy\"\n }\n ],\n \"completionTime\": 1702576531995,\n \"takerQty\": 0.004,\n \"fees\": 0.000004,\n \"isAncillary\": false,\n \"margin\": false,\n \"trade\": false,\n \"canceled\": false\n }"
],
"line_end" => 1940,
"line_start" => 1665,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (order, '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" => "this.safeInteger (order, 'lastFillTime')"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "this.parseOrderTimeInForce (this.safeInteger (order, 'timeInForce'))"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "this.safeString (order, 'stopPrice')"
},
%{
"comment" => nil,
"key" => "takeProfitPrice",
"value" => "takeProfitPrice"
},
%{
"comment" => nil,
"key" => "stopLossPrice",
"value" => "stopLossPrice"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "baseAmount"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "cost"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "filled"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"comment" => nil,
"key" => "fees",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "trades"
},
%{
"comment" => nil,
"key" => "info",
"value" => "order"
}
],
"name" => "parseOrder",
"signature" => "parseOrder (order: Dict, market: Market = undefined): Order",
"source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // createOrder market\n // {\n // \"userID\": \"65671262d93d9525ac009e36\",\n // \"orderID\": \"65671262d93d9525ac009e36170257448481749b7ee2893bafec2\",\n // \"orderType\": \"market\",\n // \"buyingCurrency\": \"ETH\",\n // \"sellingCurrency\": \"USDC\",\n // \"buyingQty\": 0.002,\n // \"timeInForce\": 4,\n // \"boughtQty\": 0.002,\n // \"soldQty\": 4.587,\n // \"creationTime\": 1702574484829,\n // \"seqNumber\": 10874285330,\n // \"firstFillTime\": 1702574484831,\n // \"lastFillTime\": 1702574484831,\n // \"fills\": [\n // {\n // \"seqNumber\": 10874285329,\n // \"timestamp\": 1702574484831,\n // \"qty\": 0.002,\n // \"price\": 2293.5,\n // \"side\": \"buy\"\n // }\n // ],\n // \"completionTime\": 1702574484831,\n // \"takerQty\": 0.002\n // }\n //\n // createOrder limit\n // {\n // \"userID\": \"65671262d93d9525ac009e36\",\n // \"orderID\": \"65671262d93d9525ac009e3617026635256739c996fe17d7cd5d4\",\n // \"orderType\": \"limit\",\n // \"buyingCurrency\": \"ETH\",\n // \"sellingCurrency\": \"USDC\",\n // \"fillStyle\": \"sell\",\n // \"orderPlatform\": \"trade-v3\",\n // \"timeInForce\": 1,\n // \"buyingQty\": 0.005655,\n // \"sellingQty\": 11.31,\n // \"boughtQty\": 0,\n // \"soldQty\": 0,\n // \"creationTime\": 1702663525713,\n // \"seqNumber\": 10885528683,\n // \"fees\": 0,\n // \"fills\": [],\n // \"isAncillary\": false,\n // \"margin\": false,\n // \"trade\": false\n // }\n //\n // fetchOrders market\n // {\n // \"userID\": \"65671262d93d9525ac009e36\",\n // \"orderID\": \"65671262d93d9525ac009e36170257061073952c6423a8c5b4d6c\",\n // \"orderType\": \"market\",\n // \"buyingCurrency\": \"ETH\",\n // \"sellingCurrency\": \"USDC\",\n // \"buyingQty\": 0.002,\n // \"timeInForce\": 4,\n // \"boughtQty\": 0.002,\n // \"soldQty\": 4.564,\n // \"creationTime\": 1702570610746,\n // \"seqNumber\": 10873722344,\n // \"firstFillTime\": 1702570610747,\n // \"lastFillTime\": 1702570610747,\n // \"fills\": [\n // {\n // \"_id\": \"657b31d360a9542449381bdc\",\n // \"seqNumber\": 10873722343,\n // \"timestamp\": 1702570610747,\n // \"qty\": 0.002,\n // \"price\": 2282,\n // \"side\": \"buy\"\n // }\n // ],\n // \"completionTime\": 1702570610747,\n // \"takerQty\": 0.002,\n // \"fees\": 0.000002,\n // \"isAncillary\": false,\n // \"margin\": false,\n // \"trade\": false,\n // \"canceled\": false,\n // \"__v\": 0\n // }\n //\n // fetchOrders margin\n // {\n // \"userData\": {\n // \"takeProfit\": 1700,\n // \"stopLoss\": 2100\n // },\n // \"_id\": \"658201d060a95424499394a2\",\n // \"seqNumber\": 10925300213,\n // \"orderType\": \"limit\",\n // \"buyingCurrency\": \"EUR\",\n // \"sellingCurrency\": \"ETH\",\n // \"userID\": \"65671262d93d9525ac009e36\",\n // \"closedQty\": 0.03,\n // \"sellingQty\": 0.03,\n // \"buyingQty\": 58.8,\n // \"creationTime\": 1703015281205,\n // \"margin\": true,\n // \"timeInForce\": 1,\n // \"boughtQty\": 59.31,\n // \"orderID\": \"65671262d93d9525ac009e3617030152811996e5b352556d3d7d8\",\n // \"lastFillTime\": 1703015281206,\n // \"soldQty\": 0.03,\n // \"closedTime\": 1703015488488,\n // \"closedVal\": 59.375,\n // \"trade\": true,\n // \"takerQty\": 59.31,\n // \"firstFillTime\": 1703015281206,\n // \"completionTime\": 1703015281206,\n // \"fills\": [\n // {\n // \"_id\": \"658201d060a95424499394a3\",\n // \"seqNumber\": 10925300212,\n // \"side\": \"sell\",\n // \"price\": 1977,\n // \"qty\": 0.03,\n // \"timestamp\": 1703015281206\n // },\n // {\n // \"_id\": \"658201d060a95424499394a4\",\n // \"seqNumber\": 10925321178,\n // \"timestamp\": 1703015488483,\n // \"qty\": 0.03,\n // \"price\": 1979.1666666666667,\n // \"side\": \"buy\"\n // }\n // ],\n // \"fees\": 0.11875000200000001,\n // \"settledQtys\": {\n // \"ETH\": -0.000092842104710025\n // },\n // \"isAncillary\": false,\n // \"canceled\": false\n // }\n //\n // fetchOrder\n // {\n // \"_id\": \"657b4e6d60a954244939ac6f\",\n // \"userID\": \"65671262d93d9525ac009e36\",\n // \"orderID\": \"65671262d93d9525ac009e361702576531985b78465468b9cc544\",\n // \"orderType\": \"market\",\n // \"buyingCurrency\": \"ETH\",\n // \"sellingCurrency\": \"USDC\",\n // \"buyingQty\": 0.004,\n // \"timeInForce\": 4,\n // \"boughtQty\": 0.004,\n // \"soldQty\": 9.236,\n // \"creationTime\": 1702576531995,\n // \"seqNumber\": 10874644062,\n // \"firstFillTime\": 1702576531995,\n // \"lastFillTime\": 1702576531995,\n // \"fills\": [\n // {\n // \"_id\": \"657b4e6d60a954244939ac70\",\n // \"seqNumber\": 10874644061,\n // \"timestamp\": 1702576531995,\n // \"qty\": 0.004,\n // \"price\": 2309,\n // \"side\": \"buy\"\n // }\n // ],\n // \"completionTime\": 1702576531995,\n // \"takerQty\": 0.004,\n // \"fees\": 0.000004,\n // \"isAncillary\": false,\n // \"margin\": false,\n // \"trade\": false,\n // \"canceled\": false\n // }\n //\n let timestamp = this.safeInteger (order, 'creationTime');\n const isCanceled = this.safeValue (order, 'canceled');\n let status = undefined;\n if (isCanceled === true) {\n if (timestamp === undefined) {\n timestamp = this.safeInteger (order, 'completionTime'); // market orders with bad price gain IOC - we mark them as 'rejected'?\n status = 'rejected'; // these orders don't have the 'creationTime` param and have 'canceled': true\n } else {\n status = 'canceled';\n }\n } else {\n status = this.safeString (order, 'status');\n order = this.omit (order, 'status'); // we mark orders from fetchOpenOrders with param 'status': 'open'\n }\n const type = this.safeString (order, 'orderType');\n let buyingQty = this.safeString (order, 'buyingQty');\n let sellingQty = this.safeString (order, 'sellingQty');\n const boughtQty = this.safeString (order, 'boughtQty');\n const soldQty = this.safeString (order, 'soldQty');\n if (type === 'market') {\n if ((buyingQty === undefined) && (boughtQty !== undefined) && (boughtQty !== '0')) {\n buyingQty = boughtQty;\n }\n if ((sellingQty === undefined) && (soldQty !== undefined) && (soldQty !== '0')) {\n sellingQty = soldQty;\n }\n }\n const buyingCurrencyId = this.safeString (order, 'buyingCurrency', '');\n const sellingCurrencyId = this.safeString (order, 'sellingCurrency', '');\n const byuingIdPlusSellingId = buyingCurrencyId + sellingCurrencyId;\n const sellingIdPlusBuyingId = sellingCurrencyId + buyingCurrencyId;\n let side = undefined;\n let marketId = undefined;\n let baseAmount = buyingQty;\n let quoteAmount = buyingQty;\n let filled = undefined;\n let cost = undefined;\n let feeInBaseOrQuote = undefined;\n const marketsById = this.indexBy (this.markets, 'id');\n if (this.safeValue (marketsById, byuingIdPlusSellingId) !== undefined) {\n side = 'buy';\n marketId = byuingIdPlusSellingId;\n quoteAmount = sellingQty;\n filled = boughtQty;\n cost = soldQty;\n feeInBaseOrQuote = 'base';\n } else if (this.safeValue (marketsById, sellingIdPlusBuyingId) !== undefined) {\n side = 'sell';\n marketId = sellingIdPlusBuyingId;\n baseAmount = sellingQty;\n filled = soldQty;\n cost = boughtQty;\n feeInBaseOrQuote = 'quote';\n }\n let price = undefined;\n if ((baseAmount !== undefined) && (quoteAmount !== undefined)) {\n price = Precise.stringDiv (quoteAmount, baseAmount);\n }\n market = this.safeMarket (marketId, market);\n let fee = undefined;\n const feeCost = this.safeString (order, 'fees');\n if ((feeCost !== undefined) && (feeInBaseOrQuote !== undefined)) {\n fee = {\n 'currency': market[feeInBaseOrQuote],\n 'cost': feeCost,\n 'rate': undefined,\n };\n }\n const trades = this.safeValue (order, 'fills', []);\n const userData = this.safeValue (order, 'userData', {});\n const clientOrderId = this.safeString (userData, 'comment');\n const takeProfitPrice = this.safeString (userData, 'takeProfit');\n const stopLossPrice = this.safeString (userData, 'stopLoss');\n return this.safeOrder ({\n 'id': this.safeString (order, 'orderID'),\n 'clientOrderId': clientOrderId,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': this.safeInteger (order, 'lastFillTime'),\n 'status': status,\n 'symbol': market['symbol'],\n 'type': type,\n 'timeInForce': this.parseOrderTimeInForce (this.safeInteger (order, 'timeInForce')),\n 'side': side,\n 'price': price,\n 'triggerPrice': this.safeString (order, 'stopPrice'),\n 'takeProfitPrice': takeProfitPrice,\n 'stopLossPrice': stopLossPrice,\n 'average': undefined,\n 'amount': baseAmount,\n 'cost': cost,\n 'filled': filled,\n 'remaining': undefined,\n 'fee': fee,\n 'fees': undefined,\n 'trades': trades,\n 'info': order,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1951,
"line_start" => 1942,
"mappings" => [],
"name" => "parseOrderTimeInForce",
"signature" => "parseOrderTimeInForce (timeInForce)",
"source" => "parseOrderTimeInForce (timeInForce) {\n const timeInForceTypes = [\n undefined,\n 'GTC',\n 'IOC',\n 'GTD',\n 'FOK',\n ];\n return this.safeValue (timeInForceTypes, timeInForce, timeInForce);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"pair\": \"PERPUSD\",\n \"timestamp\": 1702549841973,\n \"price\": 0.8615317721366659,\n \"qty\": 1e-12,\n \"ask\": 0.8742333599999257,\n \"bid\": 0.8490376365388491\n \"delta\": 0.26915154078134096,\n \"h\": 0.86220315458898,\n \"l\": 0.67866757035154,\n \"v\": 2.835000000000001e-9,\n \"sentimentData\": {\n \"sentiment\": 36.71333333333333,\n \"interest\": 0.47430830039525695\n }\n }"
],
"line_end" => 1069,
"line_start" => 1017,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "open",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "high",
"value" => "high"
},
%{
"comment" => nil,
"key" => "low",
"value" => "low"
},
%{
"comment" => nil,
"key" => "close",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "last",
"value" => "last"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "bid"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "ask"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"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" => "undefined"
},
%{
"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 // \"pair\": \"PERPUSD\",\n // \"timestamp\": 1702549841973,\n // \"price\": 0.8615317721366659,\n // \"qty\": 1e-12,\n // \"ask\": 0.8742333599999257,\n // \"bid\": 0.8490376365388491\n // \"delta\": 0.26915154078134096,\n // \"h\": 0.86220315458898,\n // \"l\": 0.67866757035154,\n // \"v\": 2.835000000000001e-9,\n // \"sentimentData\": {\n // \"sentiment\": 36.71333333333333,\n // \"interest\": 0.47430830039525695\n // }\n // }\n //\n const marketId = this.safeString (ticker, 'pair');\n market = this.safeMarket (marketId, market);\n const timestamp = this.safeInteger (ticker, 'timestamp');\n const bid = this.safeString (ticker, 'bid');\n const ask = this.safeString (ticker, 'ask');\n const high = this.safeString (ticker, 'h');\n const low = this.safeString (ticker, 'l');\n const last = this.safeString (ticker, 'price');\n const baseVolume = this.safeString (ticker, 'v');\n const delta = this.safeString (ticker, 'delta');\n const percentage = Precise.stringMul (delta, '100');\n return this.safeTicker ({\n 'symbol': market['symbol'],\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'open': undefined,\n 'high': high,\n 'low': low,\n 'close': undefined,\n 'last': last,\n 'bid': bid,\n 'bidVolume': undefined,\n 'ask': ask,\n 'askVolume': undefined,\n 'vwap': undefined,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': percentage,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': undefined,\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"pair\": \"ETHUSDT\",\n \"price\": 2077.1513,\n \"qty\": 0.00337,\n \"timestamp\": 1700684816853,\n \"seqNum\": 10644567113\n },",
"{\n \"pair\": \"ETHUSDC\",\n \"seqNumber\": 10873722343,\n \"timestamp\": 1702570610747,\n \"qty\": 0.002,\n \"price\": 2282,\n \"side\": \"buy\",\n \"orderID\": \"65671262d93d9525ac009e36170257061073952c6423a8c5b4d6c\"\n }",
"{\n \"_id\": \"657b31d360a9542449381bdc\",\n \"seqNumber\": 10873722343,\n \"timestamp\": 1702570610747,\n \"qty\": 0.002,\n \"price\": 2282,\n \"side\": \"buy\"\n }",
"{\n \"pair\":\"ETHUSDC\",\n \"seqNumber\":\"10873722343\",\n \"timestamp\":\"1702570610747\",\n \"qty\":\"0.002\",\n \"price\":\"2282\",\n \"side\":\"buy\",\n \"orderID\":\"65671262d93d9525ac009e36170257061073952c6423a8c5b4d6c\",\n \"userID\":\"65671262d93d9525ac009e36\"\n }"
],
"line_end" => 848,
"line_start" => 781,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "order",
"value" => "order"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "price",
"value" => "priceString"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // fetchTrades\n // {\n // \"pair\": \"ETHUSDT\",\n // \"price\": 2077.1513,\n // \"qty\": 0.00337,\n // \"timestamp\": 1700684816853,\n // \"seqNum\": 10644567113\n // },\n //\n // fetchMyTrades\n // {\n // \"pair\": \"ETHUSDC\",\n // \"seqNumber\": 10873722343,\n // \"timestamp\": 1702570610747,\n // \"qty\": 0.002,\n // \"price\": 2282,\n // \"side\": \"buy\",\n // \"orderID\": \"65671262d93d9525ac009e36170257061073952c6423a8c5b4d6c\"\n // }\n //\n // fetchOrders\n // {\n // \"_id\": \"657b31d360a9542449381bdc\",\n // \"seqNumber\": 10873722343,\n // \"timestamp\": 1702570610747,\n // \"qty\": 0.002,\n // \"price\": 2282,\n // \"side\": \"buy\"\n // }\n //\n // {\n // \"pair\":\"ETHUSDC\",\n // \"seqNumber\":\"10873722343\",\n // \"timestamp\":\"1702570610747\",\n // \"qty\":\"0.002\",\n // \"price\":\"2282\",\n // \"side\":\"buy\",\n // \"orderID\":\"65671262d93d9525ac009e36170257061073952c6423a8c5b4d6c\",\n // \"userID\":\"65671262d93d9525ac009e36\"\n // }\n //\n const marketId = this.safeString2 (trade, 'symbol', 'pair');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n const id = this.safeStringN (trade, [ '_id', 'seqNum', 'seqNumber' ]);\n const timestamp = this.safeInteger (trade, 'timestamp');\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'qty');\n const order = this.safeString (trade, 'orderID');\n const side = this.safeString (trade, 'side');\n return this.safeTrade ({\n 'id': id,\n 'order': order,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': symbol,\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': undefined,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'fee': undefined,\n 'info': trade,\n }, market);\n }"
}
],
path_prefix: "",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 200,
period: 1000,
requests: 5,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [
%{
auth: false,
cost: 1.67,
method: :get,
path: "/exchange/fills/{since}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/exchange/margin"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/exchange/orders/active"
},
%{
auth: false,
cost: 1.67,
method: :get,
path: "/exchange/orders/history/{since}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/exchange/orders/status/{orderID}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/users/balances"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/users/wallets"
},
%{
auth: false,
cost: 1.67,
method: :get,
path: "/users/wallets/history/{since}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/devices"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/exchange/orders/close/{orderID}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/exchange/orders/create"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/exchange/orders/hedge"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/exchange/orders/modify/{orderID}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/exchange/swap"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/exchange/swap/confirm/{swapId}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/jwt"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/jwt-read-only"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/jwtDevice"
},
%{
auth: false,
cost: 1,
method: :put,
path: "/exchange/orders/cancel/{orderID}"
},
%{
auth: false,
cost: 1,
method: :put,
path: "/jwt"
},
%{
auth: false,
cost: 1,
method: :put,
path: "/users/margin/collateral"
},
%{
auth: false,
cost: 1,
method: :put,
path: "/users/margin/primary/{currency}"
}
],
public: [
%{
auth: false,
cost: 1,
method: :get,
path: "/assets"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/demo/temp"
},
%{
auth: false,
cost: 3,
method: :get,
path: "/exchange/book/{pair}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/exchange/bookUpdates/{pair}/{from}"
},
%{
auth: false,
cost: 3,
method: :get,
path: "/exchange/candles/{pair}/{timeframe}/{from}/{to}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/exchange/prices"
},
%{
auth: false,
cost: 3,
method: :get,
path: "/exchange/ticks/{pair}/{from}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/markets"
}
]
},
required_credentials: %{
api_key: false,
password: false,
secret: false,
uid: true
},
requires_eddsa: false,
response_error: nil,
signing: %{
confidence: :medium,
pattern: :hmac_sha256_headers
},
spec_format_version: 1,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{
"min" => 300
},
"cost" => %{
"min" => 5
},
"price" => %{}
},
sample_precision: %{
"amount" => 0.01,
"price" => 1.0e-5
},
spot: %{
base: "PERP",
base_id: "PERP",
case: :upper,
contract: false,
id: "PERPUSDT",
limits: %{
"amount" => %{
"min" => 300
},
"cost" => %{
"min" => 5
},
"leverage" => %{},
"price" => %{}
},
maker: 0,
precision: %{
"amount" => 0.01,
"price" => 1.0e-5
},
quote: "USDT",
quote_id: "USDT",
separator: "",
symbol: "PERP/USDT",
taker: 0.001
}
},
symbol_patterns: %{
spot: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :no_separator_upper,
separator: "",
suffix: nil
}
},
timeframes: %{
"1d" => "86400000",
"1m" => "60000",
"30m" => "1800000",
"4h" => "14400000",
"5m" => "300000"
},
url_strategy: %{
detected_from: "fallback",
pattern: :no_prefix,
prefix: nil
},
urls: %{
api: "https://api.coinmetro.com",
api_sections: %{
"private" => "https://api.coinmetro.com",
"public" => "https://api.coinmetro.com"
},
doc: [
"https://documenter.getpostman.com/view/3653795/SVfWN6KS"
],
other: nil,
sandbox: %{
"private" => "https://api.coinmetro.com/open",
"public" => "https://api.coinmetro.com/open"
},
www: "https://coinmetro.com/"
},
version: "v1",
ws: nil
}