Packages

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

Current section

Files

Jump to
ccxt_client priv specs extracted coinone.exs
Raw

priv/specs/extracted/coinone.exs

# CoinOne Exchange Specification
#
# Auto-generated by: mix ccxt.extract coinone
# 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: [
"KR"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"SOC" => "Soda Coin",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 14,
"coveragePercent" => 100,
"enabledMethods" => 16,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 1,
"extractableMethods" => 15,
"failures" => [
%{
"error" => "coinone cancelOrder() requires {'price': 12345, 'qty': 1.2345, 'is_ask': 0} in the params argument.",
"method" => "cancelOrder"
}
]
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"amount" => "qty",
"symbol" => "currency"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/order/limit_buy",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"amount" => "qty",
"symbol" => "currency"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/order/limit_buy",
source: :intercepted
},
%{
api_section: "v2Private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/account/balance",
source: :intercepted
},
%{
api_section: "v2Public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_currencies,
param_mappings: %{},
params: [],
path: "/currencies",
response_transformer: {:extract_path, ["currencies"]},
source: :intercepted
},
%{
api_section: "v2Private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_deposit_addresses,
param_mappings: %{},
params: [
:codes
],
path: "/account/deposit_address",
response_transformer: {:extract_path, ["walletAddress"]},
source: :intercepted
},
%{
api_section: "v2Public",
auth: false,
cost: 1,
default_params: %{
"quote_currency" => "USDT",
"target_currency" => "BTC"
},
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/orderbook/{quote_currency}/{target_currency}",
source: :intercepted
},
%{
api_section: "v2Public",
auth: false,
cost: 1,
default_params: %{
"quote_currency" => "KRW"
},
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/ticker_new/{quote_currency}",
response_transformer: {:extract_path, ["tickers"]},
source: :intercepted
},
%{
api_section: "v2Private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_my_trades,
param_mappings: %{
"symbol" => "currency"
},
params: [
:symbol,
:since,
:limit
],
path: "/order/complete_orders",
response_transformer: {:extract_path, ["completeOrders"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_open_orders,
param_mappings: %{
"symbol" => "currency"
},
params: [
:symbol,
:since,
:limit
],
path: "/order/limit_orders",
response_transformer: {:extract_path, ["limitOrders"]},
source: :intercepted
},
%{
api_section: "v2Private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :fetch_order,
param_mappings: %{
"id" => "order_id",
"symbol" => "currency"
},
params: [
:id,
:symbol
],
path: "/order/query_order",
source: :intercepted
},
%{
api_section: "v2Public",
auth: false,
cost: 1,
default_params: %{
"quote_currency" => "USDT",
"target_currency" => "BTC"
},
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{
"limit" => "size"
},
params: [
:symbol,
:limit
],
path: "/orderbook/{quote_currency}/{target_currency}",
source: :intercepted
},
%{
api_section: "v2Public",
auth: false,
cost: 1,
default_params: %{
"quote_currency" => "USDT",
"target_currency" => "BTC"
},
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{},
params: [
:symbol
],
path: "/ticker_new/{quote_currency}/{target_currency}",
response_transformer: {:extract_path_unwrap, ["tickers"]},
source: :intercepted
},
%{
api_section: "v2Public",
auth: false,
cost: 1,
default_params: %{
"quote_currency" => "USDT",
"target_currency" => "BTC"
},
market_type: :spot,
method: :get,
name: :fetch_tickers,
param_mappings: %{},
params: [
:symbols
],
path: "/ticker_new/{quote_currency}/{target_currency}",
response_transformer: {:extract_path, ["tickers"]},
source: :intercepted
},
%{
api_section: "v2Public",
auth: false,
cost: 1,
default_params: %{
"quote_currency" => "USDT",
"target_currency" => "BTC"
},
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"limit" => "size"
},
params: [
:symbol,
:since,
:limit
],
path: "/trades/{quote_currency}/{target_currency}",
response_transformer: {:extract_path, ["transactions"]},
source: :intercepted
}
],
error_code_details: %{
104 => %{
description: nil,
type: :order_not_found
},
107 => %{
description: nil,
type: :invalid_parameters
},
108 => %{
description: nil,
type: :invalid_order
},
405 => %{
description: nil,
type: :network_error
}
},
error_codes: %{
104 => :order_not_found,
107 => :invalid_parameters,
108 => :invalid_order,
405 => :network_error
},
exceptions: nil,
exchange_options: %{
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"networksById" => %{}
},
extended_metadata: %{
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://user-images.githubusercontent.com/1294454/38003300-adc12fba-323f-11e8-8525-725f53c4a659.jpg"
},
extracted_metadata: %{
ccxt_version: "4.5.34"
},
features: %{
future: %{},
spot: %{
create_order: %{
hedged: false,
iceberg: false,
leverage: false,
margin_mode: false,
market_buy_by_cost: false,
market_buy_requires_price: false,
self_trade_prevention: false,
stop_loss_price: false,
take_profit_price: false,
time_in_force: %{
fok: false,
gtd: false,
ioc: false,
po: false
},
trailing: false,
trigger_direction: false,
trigger_price: false
},
fetch_my_trades: %{
days_back: 100000,
limit: 100,
margin_mode: false,
symbol_required: true,
until_days: 100000
},
fetch_open_orders: %{
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
sandbox: false
},
swap: %{}
},
fees: %{
trading: %{
maker: 0.002,
percentage: true,
taker: 0.002,
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; // fallback to default error handler\n }\n //\n // {\"result\":\"error\",\"error_code\":\"107\",\"error_msg\":\"Parameter value is wrong\"}\n // {\"result\":\"error\",\"error_code\":\"108\",\"error_msg\":\"Unknown CryptoCurrency\"}\n //\n const errorCode = this.safeString(response, 'error_code');\n if (errorCode !== undefined && errorCode !== '0') {\n const feedback = this.id + ' ' + body;\n this.throwExactlyMatchedException(this.exceptions, errorCode, 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: 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: 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: false,
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: true,
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: 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: 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: 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: 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: 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: true,
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: true,
watch_tickers: false,
watch_trades: true,
watch_trades_for_symbols: false,
withdraw: false,
ws: true
},
http_config: nil,
id: "coinone",
markets: nil,
name: "CoinOne",
ohlcv_timestamp_resolution: :unknown,
options: %{},
order_mappings: nil,
param_mappings: %{
"amount" => "qty",
"id" => "order_id",
"limit" => "size",
"symbol" => "currency"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 494,
"line_start" => 476,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const result: Dict = { 'info': response };\n const balances = this.omit (response, [\n 'errorCode',\n 'result',\n 'normalWallets',\n ]);\n const currencyIds = Object.keys (balances);\n for (let i = 0; i < currencyIds.length; i++) {\n const currencyId = currencyIds[i];\n const balance = balances[currencyId];\n const code = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['free'] = this.safeString (balance, 'avail');\n account['total'] = this.safeString (balance, 'balance');\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"result\": \"success\",\n \"errorCode\": \"0\",\n \"orderId\": \"8a82c561-40b4-4cb3-9bc0-9ac9ffc1d63b\"\n }",
"{\n \"result\": \"success\",\n \"errorCode\": \"0\",\n \"orderId\": \"0e3019f2-1e4d-11e9-9ec7-00e04c3600d7\",\n \"baseCurrency\": \"KRW\",\n \"targetCurrency\": \"BTC\",\n \"price\": \"10011000.0\",\n \"originalQty\": \"3.0\",\n \"executedQty\": \"0.62\",\n \"canceledQty\": \"1.125\",\n \"remainQty\": \"1.255\",\n \"status\": \"partially_filled\",\n \"side\": \"bid\",\n \"orderedAt\": 1499340941,\n \"updatedAt\": 1499341142,\n \"feeRate\": \"0.002\",\n \"fee\": \"0.00124\",\n \"averageExecutedPrice\": \"10011000.0\"\n }",
"{\n \"index\": \"0\",\n \"orderId\": \"68665943-1eb5-4e4b-9d76-845fc54f5489\",\n \"timestamp\": \"1449037367\",\n \"price\": \"444000.0\",\n \"qty\": \"0.3456\",\n \"type\": \"ask\",\n \"feeRate\": \"-0.0015\"\n }"
],
"line_end" => 1049,
"line_start" => 936,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "undefined"
},
%{
"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" => "'limit'"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "this.safeString (order, 'price')"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "this.safeString (order, 'averageExecutedPrice')"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "this.safeString (order, 'executedQty')"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remainingString"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
}
],
"name" => "parseOrder",
"signature" => "parseOrder (order: Dict, market: Market = undefined): Order",
"source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // createOrder\n //\n // {\n // \"result\": \"success\",\n // \"errorCode\": \"0\",\n // \"orderId\": \"8a82c561-40b4-4cb3-9bc0-9ac9ffc1d63b\"\n // }\n //\n // fetchOrder\n //\n // {\n // \"result\": \"success\",\n // \"errorCode\": \"0\",\n // \"orderId\": \"0e3019f2-1e4d-11e9-9ec7-00e04c3600d7\",\n // \"baseCurrency\": \"KRW\",\n // \"targetCurrency\": \"BTC\",\n // \"price\": \"10011000.0\",\n // \"originalQty\": \"3.0\",\n // \"executedQty\": \"0.62\",\n // \"canceledQty\": \"1.125\",\n // \"remainQty\": \"1.255\",\n // \"status\": \"partially_filled\",\n // \"side\": \"bid\",\n // \"orderedAt\": 1499340941,\n // \"updatedAt\": 1499341142,\n // \"feeRate\": \"0.002\",\n // \"fee\": \"0.00124\",\n // \"averageExecutedPrice\": \"10011000.0\"\n // }\n //\n // fetchOpenOrders\n //\n // {\n // \"index\": \"0\",\n // \"orderId\": \"68665943-1eb5-4e4b-9d76-845fc54f5489\",\n // \"timestamp\": \"1449037367\",\n // \"price\": \"444000.0\",\n // \"qty\": \"0.3456\",\n // \"type\": \"ask\",\n // \"feeRate\": \"-0.0015\"\n // }\n //\n const id = this.safeString (order, 'orderId');\n const baseId = this.safeString (order, 'baseCurrency');\n const quoteId = this.safeString (order, 'targetCurrency');\n let base = undefined;\n let quote = undefined;\n if (baseId !== undefined) {\n base = this.safeCurrencyCode (baseId);\n }\n if (quoteId !== undefined) {\n quote = this.safeCurrencyCode (quoteId);\n }\n let symbol = undefined;\n if ((base !== undefined) && (quote !== undefined)) {\n symbol = base + '/' + quote;\n market = this.safeMarket (symbol, market, '/');\n }\n const timestamp = this.safeTimestamp2 (order, 'timestamp', 'updatedAt');\n let side = this.safeString2 (order, 'type', 'side');\n if (side === 'ask') {\n side = 'sell';\n } else if (side === 'bid') {\n side = 'buy';\n }\n const remainingString = this.safeString (order, 'remainQty');\n const amountString = this.safeString2 (order, 'originalQty', 'qty');\n let status = this.safeString (order, 'status');\n // https://github.com/ccxt/ccxt/pull/7067\n if (status === 'live') {\n if ((remainingString !== undefined) && (amountString !== undefined)) {\n const isLessThan = Precise.stringLt (remainingString, amountString);\n if (isLessThan) {\n status = 'canceled';\n }\n }\n }\n status = this.parseOrderStatus (status);\n let fee = undefined;\n const feeCostString = this.safeString (order, 'fee');\n if (feeCostString !== undefined) {\n const feeCurrencyCode = (side === 'sell') ? quote : base;\n fee = {\n 'cost': feeCostString,\n 'rate': this.safeString (order, 'feeRate'),\n 'currency': feeCurrencyCode,\n };\n }\n return this.safeOrder ({\n 'info': order,\n 'id': id,\n 'clientOrderId': undefined,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'symbol': symbol,\n 'type': 'limit',\n 'timeInForce': undefined,\n 'postOnly': undefined,\n 'side': side,\n 'price': this.safeString (order, 'price'),\n 'triggerPrice': undefined,\n 'cost': undefined,\n 'average': this.safeString (order, 'averageExecutedPrice'),\n 'amount': amountString,\n 'filled': this.safeString (order, 'executedQty'),\n 'remaining': remainingString,\n 'status': status,\n 'fee': fee,\n 'trades': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 934,
"line_start" => 925,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: Str)",
"source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'live': 'open',\n 'partially_filled': 'open',\n 'partially_canceled': 'open',\n 'filled': 'closed',\n 'canceled': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"quote_currency\": \"krw\",\n \"target_currency\": \"btc\",\n \"timestamp\": 1701073357818,\n \"high\": \"50543000.0\",\n \"low\": \"49945000.0\",\n \"first\": \"50487000.0\",\n \"last\": \"50062000.0\",\n \"quote_volume\": \"11349804285.3859\",\n \"target_volume\": \"226.07268994\",\n \"best_asks\": [\n {\n \"price\": \"50081000.0\",\n \"qty\": \"0.18471358\"\n }\n ],\n \"best_bids\": [\n {\n \"price\": \"50062000.0\",\n \"qty\": \"0.04213455\"\n }\n ],\n \"id\": \"1701073357818001\"\n }"
],
"line_end" => 734,
"line_start" => 677,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "base + '/' + quote"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "high",
"value" => "this.safeString (ticker, 'high')"
},
%{
"comment" => nil,
"key" => "low",
"value" => "this.safeString (ticker, 'low')"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeString (bids, 'price')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "this.safeString (bids, 'qty')"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeString (asks, 'price')"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "this.safeString (asks, 'qty')"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "open",
"value" => "this.safeString (ticker, 'first')"
},
%{
"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.safeString (ticker, 'target_volume')"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "this.safeString (ticker, 'quote_volume')"
},
%{
"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 // \"quote_currency\": \"krw\",\n // \"target_currency\": \"btc\",\n // \"timestamp\": 1701073357818,\n // \"high\": \"50543000.0\",\n // \"low\": \"49945000.0\",\n // \"first\": \"50487000.0\",\n // \"last\": \"50062000.0\",\n // \"quote_volume\": \"11349804285.3859\",\n // \"target_volume\": \"226.07268994\",\n // \"best_asks\": [\n // {\n // \"price\": \"50081000.0\",\n // \"qty\": \"0.18471358\"\n // }\n // ],\n // \"best_bids\": [\n // {\n // \"price\": \"50062000.0\",\n // \"qty\": \"0.04213455\"\n // }\n // ],\n // \"id\": \"1701073357818001\"\n // }\n //\n const timestamp = this.safeInteger (ticker, 'timestamp');\n const last = this.safeString (ticker, 'last');\n const asks = this.safeList (ticker, 'best_asks', []);\n const bids = this.safeList (ticker, 'best_bids', []);\n const baseId = this.safeString (ticker, 'target_currency');\n const quoteId = this.safeString (ticker, 'quote_currency');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n return this.safeTicker ({\n 'symbol': base + '/' + quote,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': this.safeString (ticker, 'high'),\n 'low': this.safeString (ticker, 'low'),\n 'bid': this.safeString (bids, 'price'),\n 'bidVolume': this.safeString (bids, 'qty'),\n 'ask': this.safeString (asks, 'price'),\n 'askVolume': this.safeString (asks, 'qty'),\n 'vwap': undefined,\n 'open': this.safeString (ticker, 'first'),\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': this.safeString (ticker, 'target_volume'),\n 'quoteVolume': this.safeString (ticker, 'quote_volume'),\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": \"1701075265708001\",\n \"timestamp\": 1701075265708,\n \"price\": \"50020000\",\n \"qty\": \"0.00155177\",\n \"is_seller_maker\": false\n }",
"{\n \"timestamp\": \"1416561032\",\n \"price\": \"419000.0\",\n \"type\": \"bid\",\n \"qty\": \"0.001\",\n \"feeRate\": \"-0.0015\",\n \"fee\": \"-0.0000015\",\n \"orderId\": \"E84A1AC2-8088-4FA0-B093-A3BCDB9B3C85\"\n }"
],
"line_end" => 798,
"line_start" => 736,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (trade, 'id')"
},
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "order",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "market['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" => "fee"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "feeCostString"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "feeCurrencyCode"
},
%{
"comment" => nil,
"key" => "rate",
"value" => "feeRateString"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // fetchTrades (public)\n //\n // {\n // \"id\": \"1701075265708001\",\n // \"timestamp\": 1701075265708,\n // \"price\": \"50020000\",\n // \"qty\": \"0.00155177\",\n // \"is_seller_maker\": false\n // }\n //\n // fetchMyTrades (private)\n //\n // {\n // \"timestamp\": \"1416561032\",\n // \"price\": \"419000.0\",\n // \"type\": \"bid\",\n // \"qty\": \"0.001\",\n // \"feeRate\": \"-0.0015\",\n // \"fee\": \"-0.0000015\",\n // \"orderId\": \"E84A1AC2-8088-4FA0-B093-A3BCDB9B3C85\"\n // }\n //\n const timestamp = this.safeInteger (trade, 'timestamp');\n market = this.safeMarket (undefined, market);\n const isSellerMaker = this.safeBool (trade, 'is_seller_maker');\n let side = undefined;\n if (isSellerMaker !== undefined) {\n side = isSellerMaker ? 'sell' : 'buy';\n }\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'qty');\n const orderId = this.safeString (trade, 'orderId');\n let feeCostString = this.safeString (trade, 'fee');\n let fee = undefined;\n if (feeCostString !== undefined) {\n feeCostString = Precise.stringAbs (feeCostString);\n let feeRateString = this.safeString (trade, 'feeRate');\n feeRateString = Precise.stringAbs (feeRateString);\n const feeCurrencyCode = (side === 'sell') ? market['quote'] : market['base'];\n fee = {\n 'cost': feeCostString,\n 'currency': feeCurrencyCode,\n 'rate': feeRateString,\n };\n }\n return this.safeTrade ({\n 'id': this.safeString (trade, 'id'),\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'order': orderId,\n 'symbol': market['symbol'],\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': undefined,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'fee': fee,\n }, market);\n }"
}
],
path_prefix: "",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 50,
period: 1000,
requests: 20,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [],
public: []
},
required_credentials: %{
api_key: true,
password: false,
secret: true,
uid: false
},
requires_eddsa: false,
response_error: nil,
signing: %{
confidence: :medium,
pattern: :hmac_sha512_nonce,
signature_header: "X-COINONE-SIGNATURE"
},
spec_format_version: 1,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{},
"cost" => %{},
"price" => %{}
},
sample_precision: %{
"amount" => 0.0001,
"price" => 0.0001
},
spot: %{
base: "TNSR",
base_id: "TNSR",
case: :upper,
contract: false,
id: "1771636228741001",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
maker: 0.002,
precision: %{
"amount" => 0.0001,
"cost" => 1.0e-8,
"price" => 0.0001
},
quote: "KRW",
quote_id: "KRW",
separator: "",
symbol: "TNSR/KRW",
taker: 0.002
}
},
symbol_patterns: %{
spot: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :no_separator_upper,
separator: "",
suffix: nil
}
},
timeframes: %{},
url_strategy: %{
detected_from: "fallback",
pattern: :no_prefix,
prefix: nil
},
urls: %{
api: "https://api.coinone.co.kr",
api_sections: %{
"rest" => "https://api.coinone.co.kr",
"v2Private" => "https://api.coinone.co.kr/v2",
"v2Public" => "https://api.coinone.co.kr/public/v2",
"v2_1Private" => "https://api.coinone.co.kr/v2.1"
},
doc: "https://doc.coinone.co.kr",
other: nil,
sandbox: nil,
www: "https://coinone.co.kr"
},
version: "v2",
ws: %{
channel_templates: %{
watch_order_book: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :request_type_subscribe
},
watch_ticker: %{
market_id_format: :native,
params: [],
pattern: :request_type_subscribe
},
watch_trades: %{
market_id_format: :native,
params: [
%{
"default" => nil,
"name" => "limit"
}
],
pattern: :request_type_subscribe
}
},
has: %{
watch_balance: nil,
watch_bids_asks: nil,
watch_liquidations: nil,
watch_liquidations_for_symbols: nil,
watch_my_liquidations: nil,
watch_my_liquidations_for_symbols: nil,
watch_my_trades: nil,
watch_ohlcv: false,
watch_ohlcv_for_symbols: nil,
watch_order_book: true,
watch_order_book_for_symbols: nil,
watch_orders: false,
watch_orders_for_symbols: nil,
watch_position: nil,
watch_positions: nil,
watch_status: nil,
watch_ticker: true,
watch_tickers: false,
watch_trades: true,
watch_trades_for_symbols: false
},
message_patterns: [
%{
format: :custom,
keys: [
"request_type"
],
sources: [
:ping
]
},
%{
args_field: "channel",
format: :custom,
keys: [
"channel",
"request_type",
"topic"
],
sources: [
:send,
:watch
]
}
],
options: %{
"watchOrderBook" => %{
"snapshotDelay" => 6,
"snapshotMaxRetries" => 3
},
"wsSessionToken" => ""
},
streaming: %{
keep_alive: 20000
},
subscription_config: %{
args_field: "channel",
args_format: :string,
market_id_format: :native,
op_field: "request_type"
},
subscription_pattern: :type_subscribe,
urls: "wss://stream.coinone.co.kr",
watch_methods: [
"watchOrderBook",
"watchTicker",
"watchTrades"
]
}
}