Current section
Files
Jump to
Current section
Files
priv/specs/extracted/coinmate.exs
# CoinMate Exchange Specification
#
# Auto-generated by: mix ccxt.extract coinmate
# 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: [
"GB",
"CZ",
"EU"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 18,
"coveragePercent" => 100,
"enabledMethods" => 21,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchCurrencies",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchTransactions",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 3,
"extractableMethods" => 18,
"failures" => []
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :cancel_order,
param_mappings: %{
"id" => "orderId"
},
params: [
:id,
:symbol
],
path: "/cancelOrderWithInfo",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/buyLimit",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :create_market_order,
param_mappings: %{
"amount" => "total",
"symbol" => "currencyPair"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/buyInstant",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/buyLimit",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/balances",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"limit" => 1000
},
market_type: :spot,
method: :post,
name: :fetch_deposits_withdrawals,
param_mappings: %{
"code" => "currency"
},
params: [
:code,
:since,
:limit
],
path: "/transferHistory",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"groupByPriceLimit" => "False"
},
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol,
:limit
],
path: "/orderBook",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/tradingPairs",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"limit" => 1000
},
market_type: :spot,
method: :post,
name: :fetch_my_trades,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol,
:since,
:limit
],
path: "/tradeHistory",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_open_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/openOrders",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_order,
param_mappings: %{
"id" => "orderId"
},
params: [
:id,
:symbol
],
path: "/orderById",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"groupByPriceLimit" => "False"
},
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol,
:limit
],
path: "/orderBook",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_orders,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol,
:since,
:limit
],
path: "/orderHistory",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol
],
path: "/ticker",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_tickers,
param_mappings: %{},
params: [
:symbols
],
path: "/tickerAll",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"minutesIntoHistory" => 10
},
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol,
:since,
:limit
],
path: "/transactions",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_trading_fee,
param_mappings: %{
"symbol" => "currencyPair"
},
params: [
:symbol
],
path: "/traderFees",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :withdraw,
param_mappings: %{},
params: [
:code,
:amount,
:address,
:tag
],
path: "/bitcoinWithdrawal",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
}
],
error_code_details: %{
"Access denied." => %{
description: "{\"error\":true,\"errorMessage\":\"Access denied.\",\"data\":null}",
type: :invalid_credentials
},
"Incorrect order ID" => %{
description: nil,
type: :invalid_order
},
"Minimum Order Size " => %{
description: nil,
type: :invalid_order
},
"No order with given ID" => %{
description: nil,
type: :order_not_found
},
"Not enough account balance available" => %{
description: nil,
type: :insufficient_balance
},
"TOO MANY REQUESTS" => %{
description: nil,
type: :rate_limited
},
"max allowed precision" => %{
description: "{\"error\":true,\"errorMessage\":\"USDT_EUR - max allowed precision is 4 decimal places\",\"data\":null}",
type: :invalid_order
}
},
error_codes: %{
"Access denied." => :invalid_credentials,
"Incorrect order ID" => :invalid_order,
"Minimum Order Size " => :invalid_order,
"No order with given ID" => :order_not_found,
"Not enough account balance available" => :insufficient_balance,
"TOO MANY REQUESTS" => :rate_limited,
"max allowed precision" => :invalid_order
},
exceptions: %{
broad: %{
"Access denied." => :authentication_error,
"Incorrect order ID" => :invalid_order,
"Minimum Order Size " => :invalid_order,
"Not enough account balance available" => :insufficient_funds,
"TOO MANY REQUESTS" => :rate_limit_exceeded,
"max allowed precision" => :invalid_order
},
exact: %{
"No order with given ID" => :order_not_found
}
},
exchange_options: %{
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"networksById" => %{},
"withdraw" => %{
"fillResponsefromRequest" => true,
"methods" => %{
"ADA" => "privatePostAdaWithdrawal",
"BCH" => "privatePostBitcoinCashWithdrawal",
"BTC" => "privatePostBitcoinWithdrawal",
"DAI" => "privatePostDaiWithdrawal",
"DASH" => "privatePostDashWithdrawal",
"ETH" => "privatePostEthereumWithdrawal",
"LTC" => "privatePostLitecoinWithdrawal",
"SOL" => "privatePostSolWithdrawal",
"XRP" => "privatePostRippleWithdrawal"
}
}
},
extended_metadata: %{
fees_url: "https://coinmate.io/fees",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://user-images.githubusercontent.com/51840849/87460806-1c9f3f00-c616-11ea-8c46-a77018a8f3f4.jpg",
referral_url: "https://coinmate.io?referral=YTFkM1RsOWFObVpmY1ZjMGREQmpTRnBsWjJJNVp3PT0"
},
extracted_metadata: %{
ccxt_version: "4.5.34"
},
features: %{
future: %{},
spot: %{
create_order: %{
hedged: false,
iceberg: true,
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: false,
gtd: false,
ioc: true,
po: true
},
trailing: true,
trigger_direction: false,
trigger_price: true
},
fetch_my_trades: %{
days_back: 100000,
limit: 1000,
margin_mode: false,
symbol_required: false,
until_days: 100000
},
fetch_open_orders: %{
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_orders: %{
limit: 100,
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
sandbox: false
},
swap: %{}
},
fees: %{
trading: %{
maker: 0.004,
percentage: true,
taker: 0.006,
tier_based: true,
tiers: %{
maker: [
%{
fee: 0.004,
volume: 0
},
%{
fee: 0.002,
volume: 10000
},
%{
fee: 0.0012,
volume: 100000
},
%{
fee: 0.0009,
volume: 250000
},
%{
fee: 0.0005,
volume: 500000
},
%{
fee: 0.0003,
volume: 1000000
},
%{
fee: 0.0002,
volume: 3000000
},
%{
fee: -0.0004,
volume: 15000000
}
],
taker: [
%{
fee: 0.006,
volume: 0
},
%{
fee: 0.003,
volume: 10000
},
%{
fee: 0.0023,
volume: 100000
},
%{
fee: 0.0021,
volume: 250000
},
%{
fee: 0.0018,
volume: 500000
},
%{
fee: 0.0015,
volume: 1000000
},
%{
fee: 0.0012,
volume: 3000000
},
%{
fee: 0.001,
volume: 15000000
}
]
}
}
},
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; // fallback to default error handler\n }\n //\n // {\"error\":true,\"errorMessage\":\"Api internal error\",\"data\":null}\n // {\"error\":true,\"errorMessage\":\"Access denied.\",\"data\":null}\n //\n const errorMessage = this.safeString(response, 'errorMessage');\n if (errorMessage !== undefined) {\n const feedback = this.id + ' ' + body;\n this.throwExactlyMatchedException(this.exceptions['exact'], errorMessage, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], errorMessage, feedback);\n throw new errors.ExchangeError(feedback); // unknown message\n }\n return undefined;\n }",
has: %{
add_margin: false,
borrow_cross_margin: false,
borrow_isolated_margin: false,
borrow_margin: false,
c_o_r_s: true,
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: 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: false,
create_post_only_order_ws: false,
create_reduce_only_order: false,
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: false,
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: true,
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: 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: true,
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: 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: false,
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: 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: 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: true,
fetch_ticker_ws: false,
fetch_tickers: true,
fetch_tickers_ws: false,
fetch_time: false,
fetch_trades: true,
fetch_trades_ws: false,
fetch_trading_fee: true,
fetch_trading_fees: false,
fetch_trading_fees_ws: false,
fetch_trading_limits: false,
fetch_transaction_fee: false,
fetch_transaction_fees: false,
fetch_transactions: true,
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: false,
option: false,
private_api: true,
public_api: true,
reduce_margin: false,
repay_cross_margin: false,
repay_isolated_margin: false,
repay_margin: false,
sandbox: false,
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: true,
ws: false
},
http_config: nil,
id: "coinmate",
markets: nil,
name: "CoinMate",
ohlcv_timestamp_resolution: :unknown,
options: %{
withdraw: %{
"fillResponsefromRequest" => true,
"methods" => %{
"ADA" => "privatePostAdaWithdrawal",
"BCH" => "privatePostBitcoinCashWithdrawal",
"BTC" => "privatePostBitcoinWithdrawal",
"DAI" => "privatePostDaiWithdrawal",
"DASH" => "privatePostDashWithdrawal",
"ETH" => "privatePostEthereumWithdrawal",
"LTC" => "privatePostLitecoinWithdrawal",
"SOL" => "privatePostSolWithdrawal",
"XRP" => "privatePostRippleWithdrawal"
}
}
},
order_mappings: nil,
param_mappings: %{
"amount" => "total",
"code" => "currency",
"id" => "orderId",
"symbol" => "currencyPair"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 460,
"line_start" => 445,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const balances = this.safeValue (response, 'data', {});\n const result: Dict = { 'info': response };\n const currencyIds = Object.keys (balances);\n for (let i = 0; i < currencyIds.length; i++) {\n const currencyId = currencyIds[i];\n const code = this.safeCurrencyCode (currencyId);\n const balance = this.safeValue (balances, currencyId);\n const account = this.account ();\n account['free'] = this.safeString (balance, 'available');\n account['used'] = this.safeString (balance, 'reserved');\n account['total'] = this.safeString (balance, 'balance');\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": 781246605,\n \"timestamp\": 1584480015133,\n \"trailingUpdatedTimestamp\": null,\n \"type\": \"SELL\",\n \"currencyPair\": \"ETH_BTC\",\n \"price\": 0.0345,\n \"amount\": 0.01,\n \"stopPrice\": null,\n \"originalStopPrice\": null,\n \"marketPriceAtLastUpdate\": null,\n \"marketPriceAtOrderCreation\": null,\n \"orderTradeType\": \"LIMIT\",\n \"hidden\": false,\n \"trailing\": false,\n \"clientOrderId\": null\n }",
"{\n \"id\": 67527001,\n \"timestamp\": 1517931722613,\n \"trailingUpdatedTimestamp\": null,\n \"type\": \"BUY\",\n \"price\": 5897.24,\n \"remainingAmount\": 0.002367,\n \"originalAmount\": 0.1,\n \"stopPrice\": null,\n \"originalStopPrice\": null,\n \"marketPriceAtLastUpdate\": null,\n \"marketPriceAtOrderCreation\": null,\n \"status\": \"CANCELLED\",\n \"orderTradeType\": \"LIMIT\",\n \"hidden\": false,\n \"avgPrice\": null,\n \"trailing\": false,\n }",
"{\n \"success\": true,\n \"remainingAmount\": 0.1\n }"
],
"line_end" => 1115,
"line_start" => 1030,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"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" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "priceString"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "this.safeNumber (order, 'stopPrice')"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "averageString"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remainingString"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
}
],
"name" => "parseOrder",
"signature" => "parseOrder (order: Dict, market: Market = undefined): Order",
"source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // limit sell\n //\n // {\n // \"id\": 781246605,\n // \"timestamp\": 1584480015133,\n // \"trailingUpdatedTimestamp\": null,\n // \"type\": \"SELL\",\n // \"currencyPair\": \"ETH_BTC\",\n // \"price\": 0.0345,\n // \"amount\": 0.01,\n // \"stopPrice\": null,\n // \"originalStopPrice\": null,\n // \"marketPriceAtLastUpdate\": null,\n // \"marketPriceAtOrderCreation\": null,\n // \"orderTradeType\": \"LIMIT\",\n // \"hidden\": false,\n // \"trailing\": false,\n // \"clientOrderId\": null\n // }\n //\n // limit buy\n //\n // {\n // \"id\": 67527001,\n // \"timestamp\": 1517931722613,\n // \"trailingUpdatedTimestamp\": null,\n // \"type\": \"BUY\",\n // \"price\": 5897.24,\n // \"remainingAmount\": 0.002367,\n // \"originalAmount\": 0.1,\n // \"stopPrice\": null,\n // \"originalStopPrice\": null,\n // \"marketPriceAtLastUpdate\": null,\n // \"marketPriceAtOrderCreation\": null,\n // \"status\": \"CANCELLED\",\n // \"orderTradeType\": \"LIMIT\",\n // \"hidden\": false,\n // \"avgPrice\": null,\n // \"trailing\": false,\n // }\n //\n // cancelOrder\n //\n // {\n // \"success\": true,\n // \"remainingAmount\": 0.1\n // }\n //\n const id = this.safeString (order, 'id');\n const timestamp = this.safeInteger (order, 'timestamp');\n const side = this.safeStringLower (order, 'type');\n const priceString = this.safeString (order, 'price');\n const amountString = this.safeString (order, 'originalAmount');\n const remainingString = this.safeString2 (order, 'remainingAmount', 'amount');\n const status = this.parseOrderStatus (this.safeString (order, 'status'));\n const type = this.parseOrderType (this.safeString (order, 'orderTradeType'));\n const averageString = this.safeString (order, 'avgPrice');\n const marketId = this.safeString (order, 'currencyPair');\n const symbol = this.safeSymbol (marketId, market, '_');\n const clientOrderId = this.safeString (order, 'clientOrderId');\n return this.safeOrder ({\n 'id': id,\n 'clientOrderId': clientOrderId,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'symbol': symbol,\n 'type': type,\n 'timeInForce': undefined,\n 'postOnly': undefined,\n 'side': side,\n 'price': priceString,\n 'triggerPrice': this.safeNumber (order, 'stopPrice'),\n 'amount': amountString,\n 'cost': undefined,\n 'average': averageString,\n 'filled': undefined,\n 'remaining': remainingString,\n 'status': status,\n 'trades': undefined,\n 'info': order,\n 'fee': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1020,
"line_start" => 1012,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: Str)",
"source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'FILLED': 'closed',\n 'CANCELLED': 'canceled',\n 'PARTIALLY_FILLED': 'open',\n 'OPEN': 'open',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1028,
"line_start" => 1022,
"mappings" => [],
"name" => "parseOrderType",
"signature" => "parseOrderType (type: Str)",
"source" => "parseOrderType (type: Str) {\n const types: Dict = {\n 'LIMIT': 'limit',\n 'MARKET': 'market',\n };\n return this.safeString (types, type, type);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"last\": \"0.001337\",\n \"high\": \"0.001348\",\n \"low\": \"0.001332\",\n \"amount\": \"34.75472959\",\n \"bid\": \"0.001348\",\n \"ask\": \"0.001356\",\n \"change\": \"-0.74239050\",\n \"open\": \"0.001347\",\n \"timestamp\": \"1708074485\"\n }"
],
"line_end" => 617,
"line_start" => 579,
"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" => "high",
"value" => "this.safeNumber (ticker, 'high')"
},
%{
"comment" => nil,
"key" => "low",
"value" => "this.safeNumber (ticker, 'low')"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeNumber (ticker, 'bid')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeNumber (ticker, 'ask')"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "askVolume",
"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" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "this.safeNumber (ticker, 'amount')"
},
%{
"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 // \"last\": \"0.001337\",\n // \"high\": \"0.001348\",\n // \"low\": \"0.001332\",\n // \"amount\": \"34.75472959\",\n // \"bid\": \"0.001348\",\n // \"ask\": \"0.001356\",\n // \"change\": \"-0.74239050\",\n // \"open\": \"0.001347\",\n // \"timestamp\": \"1708074485\"\n // }\n //\n const timestamp = this.safeTimestamp (ticker, 'timestamp');\n const last = this.safeNumber (ticker, 'last');\n return this.safeTicker ({\n 'symbol': market['symbol'],\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': this.safeNumber (ticker, 'high'),\n 'low': this.safeNumber (ticker, 'low'),\n 'bid': this.safeNumber (ticker, 'bid'),\n 'bidVolume': undefined,\n 'ask': this.safeNumber (ticker, 'ask'),\n 'vwap': undefined,\n 'askVolume': undefined,\n 'open': undefined,\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': this.safeNumber (ticker, 'amount'),\n 'quoteVolume': undefined,\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"transactionId\": 2671819,\n \"createdTimestamp\": 1529649127605,\n \"currencyPair\": \"LTC_BTC\",\n \"type\": \"BUY\",\n \"orderType\": \"LIMIT\",\n \"orderId\": 101810227,\n \"amount\": 0.01,\n \"price\": 0.01406,\n \"fee\": 0,\n \"feeType\": \"MAKER\"\n }",
"{\n \"timestamp\":1561598833416,\n \"transactionId\":\"4156303\",\n \"price\":10950.41,\n \"amount\":0.004,\n \"currencyPair\":\"BTC_EUR\",\n \"tradeType\":\"BUY\"\n }"
],
"line_end" => 888,
"line_start" => 826,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
},
%{
"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" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "order",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "takerOrMaker"
},
%{
"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 // fetchMyTrades (private)\n //\n // {\n // \"transactionId\": 2671819,\n // \"createdTimestamp\": 1529649127605,\n // \"currencyPair\": \"LTC_BTC\",\n // \"type\": \"BUY\",\n // \"orderType\": \"LIMIT\",\n // \"orderId\": 101810227,\n // \"amount\": 0.01,\n // \"price\": 0.01406,\n // \"fee\": 0,\n // \"feeType\": \"MAKER\"\n // }\n //\n // fetchTrades (public)\n //\n // {\n // \"timestamp\":1561598833416,\n // \"transactionId\":\"4156303\",\n // \"price\":10950.41,\n // \"amount\":0.004,\n // \"currencyPair\":\"BTC_EUR\",\n // \"tradeType\":\"BUY\"\n // }\n //\n const marketId = this.safeString (trade, 'currencyPair');\n market = this.safeMarket (marketId, market, '_');\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'amount');\n const side = this.safeStringLower2 (trade, 'type', 'tradeType');\n const type = this.safeStringLower (trade, 'orderType');\n const orderId = this.safeString (trade, 'orderId');\n const id = this.safeString (trade, 'transactionId');\n const timestamp = this.safeInteger2 (trade, 'timestamp', 'createdTimestamp');\n let fee = undefined;\n const feeCostString = this.safeString (trade, 'fee');\n if (feeCostString !== undefined) {\n fee = {\n 'cost': feeCostString,\n 'currency': market['quote'],\n };\n }\n let takerOrMaker = this.safeString (trade, 'feeType');\n takerOrMaker = (takerOrMaker === 'MAKER') ? 'maker' : 'taker';\n return this.safeTrade ({\n 'id': id,\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': market['symbol'],\n 'type': type,\n 'side': side,\n 'order': orderId,\n 'takerOrMaker': takerOrMaker,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'fee': fee,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"transactionId\": 1862815,\n \"timestamp\": 1516803982388,\n \"amountCurrency\": \"LTC\",\n \"amount\": 1,\n \"fee\": 0,\n \"walletType\": \"LTC\",\n \"transferType\": \"DEPOSIT\",\n \"transferStatus\": \"COMPLETED\",\n \"txid\":\n \"ccb9255dfa874e6c28f1a64179769164025329d65e5201849c2400abd6bce245\",\n \"destination\": \"LQrtSKA6LnhcwRrEuiborQJnjFF56xqsFn\",\n \"destinationTag\": null\n }",
"{\n \"transactionId\": 2140966,\n \"timestamp\": 1519314282976,\n \"amountCurrency\": \"EUR\",\n \"amount\": 8421.7228,\n \"fee\": 16.8772,\n \"walletType\": \"BANK_WIRE\",\n \"transferType\": \"WITHDRAWAL\",\n \"transferStatus\": \"COMPLETED\",\n \"txid\": null,\n \"destination\": null,\n \"destinationTag\": null\n }",
"{\n \"id\": 2132583,\n }"
],
"line_end" => 733,
"line_start" => 663,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "transaction"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString2 (transaction, 'transactionId', 'id')"
},
%{
"comment" => nil,
"key" => "txid",
"value" => "this.safeString (transaction, 'txid')"
},
%{
"comment" => nil,
"key" => "type",
"value" => "this.safeStringLower (transaction, 'transferType')"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "code"
},
%{
"comment" => nil,
"key" => "network",
"value" => "this.safeString (transaction, 'walletType')"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.safeNumber (transaction, 'amount')"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseTransactionStatus (this.safeString (transaction, 'transferStatus'))"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "address",
"value" => "this.safeString (transaction, 'destination')"
},
%{
"comment" => nil,
"key" => "addressFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "this.safeString (transaction, 'destinationTag')"
},
%{
"comment" => nil,
"key" => "tagFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "updated",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "comment",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "{\n 'cost': this.safeNumber (transaction, 'fee'),\n 'currency': code,\n 'rate': undefined,\n }"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "this.safeNumber (transaction, 'fee')"
},
%{
"comment" => nil,
"key" => "rate",
"value" => "undefined"
}
],
"name" => "parseTransaction",
"signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction",
"source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // deposits\n //\n // {\n // \"transactionId\": 1862815,\n // \"timestamp\": 1516803982388,\n // \"amountCurrency\": \"LTC\",\n // \"amount\": 1,\n // \"fee\": 0,\n // \"walletType\": \"LTC\",\n // \"transferType\": \"DEPOSIT\",\n // \"transferStatus\": \"COMPLETED\",\n // \"txid\":\n // \"ccb9255dfa874e6c28f1a64179769164025329d65e5201849c2400abd6bce245\",\n // \"destination\": \"LQrtSKA6LnhcwRrEuiborQJnjFF56xqsFn\",\n // \"destinationTag\": null\n // }\n //\n // withdrawals\n //\n // {\n // \"transactionId\": 2140966,\n // \"timestamp\": 1519314282976,\n // \"amountCurrency\": \"EUR\",\n // \"amount\": 8421.7228,\n // \"fee\": 16.8772,\n // \"walletType\": \"BANK_WIRE\",\n // \"transferType\": \"WITHDRAWAL\",\n // \"transferStatus\": \"COMPLETED\",\n // \"txid\": null,\n // \"destination\": null,\n // \"destinationTag\": null\n // }\n //\n // withdraw\n //\n // {\n // \"id\": 2132583,\n // }\n //\n const timestamp = this.safeInteger (transaction, 'timestamp');\n const currencyId = this.safeString (transaction, 'amountCurrency');\n const code = this.safeCurrencyCode (currencyId, currency);\n return {\n 'info': transaction,\n 'id': this.safeString2 (transaction, 'transactionId', 'id'),\n 'txid': this.safeString (transaction, 'txid'),\n 'type': this.safeStringLower (transaction, 'transferType'),\n 'currency': code,\n 'network': this.safeString (transaction, 'walletType'),\n 'amount': this.safeNumber (transaction, 'amount'),\n 'status': this.parseTransactionStatus (this.safeString (transaction, 'transferStatus')),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'address': this.safeString (transaction, 'destination'),\n 'addressFrom': undefined,\n 'addressTo': undefined,\n 'tag': this.safeString (transaction, 'destinationTag'),\n 'tagFrom': undefined,\n 'tagTo': undefined,\n 'updated': undefined,\n 'comment': undefined,\n 'internal': undefined,\n 'fee': {\n 'cost': this.safeNumber (transaction, 'fee'),\n 'currency': code,\n 'rate': undefined,\n },\n } as Transaction;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 661,
"line_start" => 650,
"mappings" => [],
"name" => "parseTransactionStatus",
"signature" => "parseTransactionStatus (status: Str)",
"source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n 'COMPLETED': 'ok',\n 'WAITING': 'pending',\n 'SENT': 'pending',\n 'CREATED': 'pending',\n 'OK': 'ok',\n 'NEW': 'pending',\n 'CANCELED': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }"
}
],
path_prefix: "",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 600,
period: 1000,
requests: 1,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [],
public: []
},
required_credentials: %{
api_key: true,
password: false,
secret: true,
uid: true
},
requires_eddsa: false,
response_error: nil,
signing: %{
confidence: :medium,
pattern: :hmac_sha256_query
},
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" => 1.5e-5
},
"cost" => %{},
"price" => %{}
},
sample_precision: %{
"amount" => 1.0e-8,
"price" => 0.1
},
spot: %{
base: "BTC",
base_id: "BTC",
case: :upper,
contract: false,
id: "BTC_EUR",
limits: %{
"amount" => %{
"min" => 1.5e-5
},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
maker: 0.004,
precision: %{
"amount" => 1.0e-8,
"price" => 0.1
},
quote: "EUR",
quote_id: "EUR",
separator: "_",
symbol: "BTC/EUR",
taker: 0.006
}
},
symbol_patterns: %{
spot: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :underscore_upper,
separator: "_",
suffix: nil
}
},
timeframes: %{},
url_strategy: %{
detected_from: "fallback",
pattern: :no_prefix,
prefix: nil
},
urls: %{
api: "https://coinmate.io/api",
api_sections: %{
"rest" => "https://coinmate.io/api"
},
doc: [
"https://coinmate.docs.apiary.io",
"https://coinmate.io/developers"
],
other: nil,
sandbox: nil,
www: "https://coinmate.io"
},
version: nil,
ws: nil
}