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 indodax.exs
Raw

priv/specs/extracted/indodax.exs

# INDODAX Exchange Specification
#
# Auto-generated by: mix ccxt.extract indodax
# CCXT version: 4.5.42
# Spec format version: 2
#
# 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: [
"ID"
],
currencies: %{},
currency_aliases: %{
"BCHABC" => "BCH",
"BCHSV" => "BSV",
"DRK" => "DASH",
"NEM" => "XEM",
"STR" => "XLM",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 16,
"coveragePercent" => 100,
"enabledMethods" => 21,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchDepositAddress",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchTransactions",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 3,
"extractableMethods" => 18,
"failures" => [
%{
"error" => "indodax cancelOrder() requires an extra \"side\" param",
"method" => "cancelOrder"
},
%{
"error" => "indodax createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price).",
"method" => "createMarketOrder"
}
]
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"USDT" => 50
},
expects: :single,
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"amount" => "BTC",
"side" => "type",
"symbol" => "pair"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/trade",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"USDT" => 50
},
expects: :single,
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"amount" => "BTC",
"side" => "type",
"symbol" => "pair"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/trade",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 4,
expects: :single,
market_type: :spot,
method: :post,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/getInfo",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 4,
expects: :list,
market_type: :spot,
method: :post,
name: :fetch_closed_orders,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/orderHistory",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 4,
expects: :list,
market_type: :spot,
method: :post,
name: :fetch_deposit_addresses,
param_mappings: %{},
params: [
:codes
],
path: "/getInfo",
response_transformer: {:extract_path, ["return"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 4,
expects: :list,
market_type: :spot,
method: :post,
name: :fetch_deposits_withdrawals,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/transHistory",
response_transformer: {:extract_path, ["return"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:limit
],
path: "/api/depth/{pair}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/api/pairs",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 4,
expects: :list,
market_type: :spot,
method: :post,
name: :fetch_open_orders,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/openOrders",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 4,
expects: :single,
market_type: :spot,
method: :post,
name: :fetch_order,
param_mappings: %{
"id" => "order_id",
"symbol" => "pair"
},
params: [
:id,
:symbol
],
path: "/getOrder",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:limit
],
path: "/api/depth/{pair}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol
],
path: "/api/ticker/{pair}",
response_transformer: {:extract_path_unwrap, ["ticker"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_time,
param_mappings: %{},
params: [],
path: "/api/server_time",
response_transformer: {:extract_path_unwrap, ["server_time"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 5,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/api/trades/{pair}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 4,
expects: :single,
market_type: :spot,
method: :post,
name: :fetch_transaction_fee,
param_mappings: %{
"code" => "currency"
},
params: [
:code
],
path: "/withdrawFee",
response_transformer: {:extract_path_unwrap, ["return"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 4,
default_params: %{
"request_id" => "1773282991489"
},
expects: :single,
market_type: :spot,
method: :post,
name: :withdraw,
param_mappings: %{
"address" => "withdraw_address",
"amount" => "withdraw_amount",
"code" => "currency"
},
params: [
:code,
:amount,
:address,
:tag
],
path: "/withdrawCoin",
source: :intercepted
}
],
error_code_details: %{
"Insufficient balance." => %{
description: nil,
type: :insufficient_balance
},
"Invalid credentials. API not found or session has expired." => %{
description: nil,
type: :invalid_credentials
},
"Invalid credentials. Bad sign." => %{
description: nil,
type: :invalid_credentials
},
"Minimum order" => %{
description: nil,
type: :invalid_order
},
"Minimum price" => %{
description: nil,
type: :invalid_order
},
"invalid order." => %{
description: nil,
type: :order_not_found
},
"invalid_pair" => %{
description: "{\"error\":\"invalid_pair\",\"error_description\":\"Invalid Pair\"}",
type: :invalid_order
}
},
error_codes: %{
"Insufficient balance." => :insufficient_balance,
"Invalid credentials. API not found or session has expired." => :invalid_credentials,
"Invalid credentials. Bad sign." => :invalid_credentials,
"Minimum order" => :invalid_order,
"Minimum price" => :invalid_order,
"invalid order." => :order_not_found,
"invalid_pair" => :invalid_order
},
exceptions: %{
broad: %{
"Minimum order" => :invalid_order,
"Minimum price" => :invalid_order
},
exact: %{
"Insufficient balance." => :insufficient_funds,
"Invalid credentials. API not found or session has expired." => :authentication_error,
"Invalid credentials. Bad sign." => :authentication_error,
"invalid order." => :order_not_found,
"invalid_pair" => :bad_symbol
}
},
exchange_options: %{
"adjustForTimeDifference" => false,
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"networks" => %{
"BSC" => "bep20",
"MATIC" => "polygon",
"TRC20" => "trc20",
"XLM" => "Stellar Token"
},
"networksById" => %{
"Stellar Token" => "XLM",
"bep20" => "BSC",
"polygon" => "MATIC",
"trc20" => "TRC20"
},
"recvWindow" => 5000,
"timeDifference" => 0
},
extended_metadata: %{
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://user-images.githubusercontent.com/51840849/87070508-9358c880-c221-11ea-8dc5-5391afbbb422.jpg",
referral_url: "https://indodax.com/ref/testbitcoincoid/1"
},
extracted_metadata: %{
ccxt_version: "4.5.42"
},
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: true,
po: false
},
trailing: false,
trigger_direction: false,
trigger_price: false
},
fetch_closed_orders: %{
days_back: 100000,
days_back_canceled: 1,
limit: 1000,
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
fetch_ohlcv: %{
limit: 2000
},
fetch_open_orders: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
sandbox: false
},
swap: %{}
},
fees: %{
trading: %{
maker: 0,
percentage: true,
taker: 0.003,
tier_based: false
}
},
forward_aliases: nil,
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 // { success: 0, error: \"invalid order.\" }\n // or\n // [{ data, ... }, { ... }, ... ]\n // {\"success\":\"1\",\"status\":\"approved\",\"withdraw_currency\":\"strm\",\"withdraw_address\":\"0x2b9A8cd5535D99b419aEfFBF1ae8D90a7eBdb24E\",\"withdraw_amount\":\"2165.05767839\",\"fee\":\"21.11000000\",\"amount_after_fee\":\"2143.94767839\",\"submit_time\":\"1730759489\",\"withdraw_id\":\"strm-3423\",\"txid\":\"\"}\n if (Array.isArray(response)) {\n return undefined; // public endpoints may return []-arrays\n }\n const error = this.safeValue(response, 'error', '');\n if (!('success' in response) && error === '') {\n return undefined; // no 'success' property on public responses\n }\n const status = this.safeString(response, 'success');\n if (status === 'approved') {\n return undefined;\n }\n if (this.safeInteger(response, 'success', 0) === 1) {\n // { success: 1, return: { orders: [] }}\n if (!('return' in response)) {\n throw new errors.ExchangeError(this.id + ': malformed response: ' + this.json(response));\n }\n else {\n return undefined;\n }\n }\n const feedback = this.id + ' ' + body;\n this.throwExactlyMatchedException(this.exceptions['exact'], error, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], error, feedback);\n throw new errors.ExchangeError(feedback); // unknown message\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: 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_a_d_l_rank: false,
fetch_accounts: false,
fetch_all_greeks: false,
fetch_balance: true,
fetch_balance_ws: false,
fetch_bids_asks: false,
fetch_borrow_interest: false,
fetch_borrow_rate: false,
fetch_borrow_rate_histories: false,
fetch_borrow_rate_history: false,
fetch_borrow_rates: false,
fetch_borrow_rates_per_symbol: false,
fetch_canceled_and_closed_orders: false,
fetch_canceled_orders: false,
fetch_closed_order: false,
fetch_closed_orders: true,
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: false,
fetch_currencies_ws: true,
fetch_deposit: false,
fetch_deposit_address: true,
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: 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_price: 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: false,
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_a_d_l_rank: false,
fetch_position_for_symbol_ws: false,
fetch_position_history: false,
fetch_position_mode: false,
fetch_position_ws: false,
fetch_positions: false,
fetch_positions_a_d_l_rank: 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: false,
fetch_tickers_ws: false,
fetch_time: true,
fetch_trades: true,
fetch_trades_ws: false,
fetch_trading_fee: false,
fetch_trading_fees: false,
fetch_trading_fees_ws: false,
fetch_trading_limits: false,
fetch_transaction_fee: true,
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,
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: "indodax",
markets: nil,
name: "INDODAX",
ohlcv_timestamp_resolution: :unknown,
options: %{
adjust_for_time_difference: false,
networks: %{
"BSC" => "bep20",
"MATIC" => "polygon",
"TRC20" => "trc20",
"XLM" => "Stellar Token"
},
recv_window: 5000,
time_difference: 0
},
order_mappings: nil,
param_mappings: %{
"address" => "withdraw_address",
"amount" => "withdraw_amount",
"code" => "currency",
"id" => "order_id",
"side" => "type",
"symbol" => "pair"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 454,
"line_start" => 434,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "response"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
}
],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const balances = this.safeValue (response, 'return', {});\n const free = this.safeValue (balances, 'balance', {});\n const used = this.safeValue (balances, 'balance_hold', {});\n const timestamp = this.safeTimestamp (balances, 'server_time');\n const result: Dict = {\n 'info': response,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n };\n const currencyIds = Object.keys (free);\n for (let i = 0; i < currencyIds.length; i++) {\n const currencyId = currencyIds[i];\n const code = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['free'] = this.safeString (free, currencyId);\n account['used'] = this.safeString (used, currencyId);\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"Time\": 1708416900,\n \"Open\": 51707.52,\n \"High\": 51707.52,\n \"Low\": 51707.52,\n \"Close\": 51707.52,\n \"Volume\": \"0\"\n }"
],
"line_end" => 697,
"line_start" => 678,
"mappings" => [],
"name" => "parseOHLCV",
"signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV",
"source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // {\n // \"Time\": 1708416900,\n // \"Open\": 51707.52,\n // \"High\": 51707.52,\n // \"Low\": 51707.52,\n // \"Close\": 51707.52,\n // \"Volume\": \"0\"\n // }\n //\n return [\n this.safeTimestamp (ohlcv, 'Time'),\n this.safeNumber (ohlcv, 'Open'),\n this.safeNumber (ohlcv, 'High'),\n this.safeNumber (ohlcv, 'Low'),\n this.safeNumber (ohlcv, 'Close'),\n this.safeNumber (ohlcv, 'Volume'),\n ];\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"order_id\": \"12345\",\n \"submit_time\": \"1392228122\",\n \"price\": \"8000000\",\n \"type\": \"sell\",\n \"order_ltc\": \"100000000\",\n \"remain_ltc\": \"100000000\"\n }",
"{\n \"order_id\": \"49326856\",\n \"type\": \"sell\",\n \"price\": \"1000000000\",\n \"submit_time\": \"1618314671\",\n \"finish_time\": \"1618314671\",\n \"status\": \"filled\",\n \"order_xrp\": \"30.45000000\",\n \"remain_xrp\": \"0.00000000\"\n }",
"{\n \"order_id\": 666883,\n \"client_order_id\": \"clientx-sj82ks82j\",\n \"type\": \"sell\",\n \"pair\": \"btc_idr\",\n \"balance\": {\n \"idr\": \"33605800\",\n \"btc\": \"0.00000000\",\n ...\n \"frozen_idr\": \"0\",\n \"frozen_btc\": \"0.00000000\",\n ...\n }\n }"
],
"line_end" => 853,
"line_start" => 757,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "this.safeString (order, 'client_order_id')"
},
%{
"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" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "cost"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remaining"
},
%{
"comment" => nil,
"key" => "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 // {\n // \"order_id\": \"12345\",\n // \"submit_time\": \"1392228122\",\n // \"price\": \"8000000\",\n // \"type\": \"sell\",\n // \"order_ltc\": \"100000000\",\n // \"remain_ltc\": \"100000000\"\n // }\n //\n // market closed orders - note that the price is very high\n // and does not reflect actual price the order executed at\n //\n // {\n // \"order_id\": \"49326856\",\n // \"type\": \"sell\",\n // \"price\": \"1000000000\",\n // \"submit_time\": \"1618314671\",\n // \"finish_time\": \"1618314671\",\n // \"status\": \"filled\",\n // \"order_xrp\": \"30.45000000\",\n // \"remain_xrp\": \"0.00000000\"\n // }\n //\n // cancelOrder\n //\n // {\n // \"order_id\": 666883,\n // \"client_order_id\": \"clientx-sj82ks82j\",\n // \"type\": \"sell\",\n // \"pair\": \"btc_idr\",\n // \"balance\": {\n // \"idr\": \"33605800\",\n // \"btc\": \"0.00000000\",\n // ...\n // \"frozen_idr\": \"0\",\n // \"frozen_btc\": \"0.00000000\",\n // ...\n // }\n // }\n //\n let side = undefined;\n if ('type' in order) {\n side = order['type'];\n }\n const status = this.parseOrderStatus (this.safeString (order, 'status', 'open'));\n let symbol = undefined;\n let cost = undefined;\n const price = this.safeString (order, 'price');\n let amount = undefined;\n let remaining = undefined;\n const marketId = this.safeString (order, 'pair');\n market = this.safeMarket (marketId, market);\n if (market !== undefined) {\n symbol = market['symbol'];\n let quoteId = market['quoteId'];\n let baseId = market['baseId'];\n if ((market['quoteId'] === 'idr') && ('order_rp' in order)) {\n quoteId = 'rp';\n }\n if ((market['baseId'] === 'idr') && ('remain_rp' in order)) {\n baseId = 'rp';\n }\n cost = this.safeString (order, 'order_' + quoteId);\n if (!cost) {\n amount = this.safeString (order, 'order_' + baseId);\n remaining = this.safeString (order, 'remain_' + baseId);\n }\n }\n const timestamp = this.safeInteger (order, 'submit_time');\n const fee = undefined;\n const id = this.safeString (order, 'order_id');\n return this.safeOrder ({\n 'info': order,\n 'id': id,\n 'clientOrderId': this.safeString (order, 'client_order_id'),\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': price,\n 'triggerPrice': undefined,\n 'cost': cost,\n 'average': undefined,\n 'amount': amount,\n 'filled': undefined,\n 'remaining': remaining,\n 'status': status,\n 'fee': fee,\n 'trades': undefined,\n });\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 755,
"line_start" => 748,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: Str)",
"source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'open': 'open',\n 'filled': 'closed',\n 'cancelled': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"high\":\"0.01951\",\n \"low\":\"0.01877\",\n \"vol_eth\":\"39.38839319\",\n \"vol_btc\":\"0.75320886\",\n \"last\":\"0.01896\",\n \"buy\":\"0.01896\",\n \"sell\":\"0.019\",\n \"server_time\":1565248908\n }"
],
"line_end" => 560,
"line_start" => 520,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "high",
"value" => "this.safeString (ticker, 'high')"
},
%{
"comment" => nil,
"key" => "low",
"value" => "this.safeString (ticker, 'low')"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeString (ticker, 'buy')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeString (ticker, 'sell')"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "open",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "close",
"value" => "last"
},
%{
"comment" => nil,
"key" => "last",
"value" => "last"
},
%{
"comment" => nil,
"key" => "previousClose",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "change",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "this.safeString (ticker, baseVolume)"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "this.safeString (ticker, quoteVolume)"
},
%{
"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 // \"high\":\"0.01951\",\n // \"low\":\"0.01877\",\n // \"vol_eth\":\"39.38839319\",\n // \"vol_btc\":\"0.75320886\",\n // \"last\":\"0.01896\",\n // \"buy\":\"0.01896\",\n // \"sell\":\"0.019\",\n // \"server_time\":1565248908\n // }\n //\n const symbol = this.safeSymbol (undefined, market);\n const timestamp = this.safeTimestamp (ticker, 'server_time');\n const baseVolume = 'vol_' + market['baseId'].toLowerCase ();\n const quoteVolume = 'vol_' + market['quoteId'].toLowerCase ();\n const last = this.safeString (ticker, 'last');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': this.safeString (ticker, 'high'),\n 'low': this.safeString (ticker, 'low'),\n 'bid': this.safeString (ticker, 'buy'),\n 'bidVolume': undefined,\n 'ask': this.safeString (ticker, 'sell'),\n 'askVolume': undefined,\n 'vwap': 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.safeString (ticker, baseVolume),\n 'quoteVolume': this.safeString (ticker, quoteVolume),\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 655,
"line_start" => 638,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (trade, 'tid')"
},
%{
"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" => "this.safeSymbol (undefined, market)"
},
%{
"comment" => nil,
"key" => "type",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "this.safeString (trade, 'type')"
},
%{
"comment" => nil,
"key" => "order",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "price",
"value" => "this.safeString (trade, 'price')"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.safeString (trade, 'amount')"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n const timestamp = this.safeTimestamp (trade, 'date');\n return this.safeTrade ({\n 'id': this.safeString (trade, 'tid'),\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': this.safeSymbol (undefined, market),\n 'type': undefined,\n 'side': this.safeString (trade, 'type'),\n 'order': undefined,\n 'takerOrMaker': undefined,\n 'price': this.safeString (trade, 'price'),\n 'amount': this.safeString (trade, 'amount'),\n 'cost': undefined,\n 'fee': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"success\": 1,\n \"status\": \"approved\",\n \"withdraw_currency\": \"xrp\",\n \"withdraw_address\": \"rwWr7KUZ3ZFwzgaDGjKBysADByzxvohQ3C\",\n \"withdraw_amount\": \"10000.00000000\",\n \"fee\": \"2.00000000\",\n \"amount_after_fee\": \"9998.00000000\",\n \"submit_time\": \"1509469200\",\n \"withdraw_id\": \"xrp-12345\",\n \"txid\": \"\",\n \"withdraw_memo\": \"123123\"\n }",
"{\n \"status\": \"success\",\n \"type\": \"coupon\",\n \"rp\": \"115205\",\n \"fee\": \"500\",\n \"amount\": \"114705\",\n \"submit_time\": \"1539844166\",\n \"success_time\": \"1539844189\",\n \"withdraw_id\": \"1783717\",\n \"tx\": \"BTC-IDR-RDTVVO2P-ETD0EVAW-VTNZGMIR-HTNTUAPI-84ULM9OI\",\n \"sender\": \"boris\",\n \"used_by\": \"viginia88\"\n }",
"{\n \"status\": \"success\",\n \"btc\": \"0.00118769\",\n \"amount\": \"0.00118769\",\n \"success_time\": \"1539529208\",\n \"deposit_id\": \"3602369\",\n \"tx\": \"c816aeb35a5b42f389970325a32aff69bb6b2126784dcda8f23b9dd9570d6573\"\n },"
],
"line_end" => 1332,
"line_start" => 1256,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString2 (transaction, 'withdraw_id', 'deposit_id')"
},
%{
"comment" => nil,
"key" => "txid",
"value" => "this.safeString2 (transaction, 'txid', 'tx')"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "network",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "addressFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "this.safeString (transaction, 'withdraw_address')"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.safeNumberN (transaction, [ 'amount', 'withdraw_amount', 'deposit_amount' ])"
},
%{
"comment" => nil,
"key" => "type",
"value" => "(depositId === undefined) ? 'withdraw' : 'deposit'"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "this.safeCurrencyCode (undefined, currency)"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseTransactionStatus (status)"
},
%{
"comment" => nil,
"key" => "updated",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "comment",
"value" => "this.safeString (transaction, 'withdraw_memo')"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"comment" => nil,
"key" => "info",
"value" => "transaction"
}
],
"name" => "parseTransaction",
"signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction",
"source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // withdraw\n //\n // {\n // \"success\": 1,\n // \"status\": \"approved\",\n // \"withdraw_currency\": \"xrp\",\n // \"withdraw_address\": \"rwWr7KUZ3ZFwzgaDGjKBysADByzxvohQ3C\",\n // \"withdraw_amount\": \"10000.00000000\",\n // \"fee\": \"2.00000000\",\n // \"amount_after_fee\": \"9998.00000000\",\n // \"submit_time\": \"1509469200\",\n // \"withdraw_id\": \"xrp-12345\",\n // \"txid\": \"\",\n // \"withdraw_memo\": \"123123\"\n // }\n //\n // transHistory\n //\n // {\n // \"status\": \"success\",\n // \"type\": \"coupon\",\n // \"rp\": \"115205\",\n // \"fee\": \"500\",\n // \"amount\": \"114705\",\n // \"submit_time\": \"1539844166\",\n // \"success_time\": \"1539844189\",\n // \"withdraw_id\": \"1783717\",\n // \"tx\": \"BTC-IDR-RDTVVO2P-ETD0EVAW-VTNZGMIR-HTNTUAPI-84ULM9OI\",\n // \"sender\": \"boris\",\n // \"used_by\": \"viginia88\"\n // }\n //\n // {\n // \"status\": \"success\",\n // \"btc\": \"0.00118769\",\n // \"amount\": \"0.00118769\",\n // \"success_time\": \"1539529208\",\n // \"deposit_id\": \"3602369\",\n // \"tx\": \"c816aeb35a5b42f389970325a32aff69bb6b2126784dcda8f23b9dd9570d6573\"\n // },\n const status = this.safeString (transaction, 'status');\n const timestamp = this.safeTimestamp2 (transaction, 'success_time', 'submit_time');\n const depositId = this.safeString (transaction, 'deposit_id');\n const feeCost = this.safeNumber (transaction, 'fee');\n let fee = undefined;\n if (feeCost !== undefined) {\n fee = {\n 'currency': this.safeCurrencyCode (undefined, currency),\n 'cost': feeCost,\n 'rate': undefined,\n };\n }\n return {\n 'id': this.safeString2 (transaction, 'withdraw_id', 'deposit_id'),\n 'txid': this.safeString2 (transaction, 'txid', 'tx'),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': undefined,\n 'addressFrom': undefined,\n 'address': this.safeString (transaction, 'withdraw_address'),\n 'addressTo': undefined,\n 'amount': this.safeNumberN (transaction, [ 'amount', 'withdraw_amount', 'deposit_amount' ]),\n 'type': (depositId === undefined) ? 'withdraw' : 'deposit',\n 'currency': this.safeCurrencyCode (undefined, currency),\n 'status': this.parseTransactionStatus (status),\n 'updated': undefined,\n 'tagFrom': undefined,\n 'tag': undefined,\n 'tagTo': undefined,\n 'comment': this.safeString (transaction, 'withdraw_memo'),\n 'internal': undefined,\n 'fee': fee,\n 'info': transaction,\n } as Transaction;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1339,
"line_start" => 1334,
"mappings" => [],
"name" => "parseTransactionStatus",
"signature" => "parseTransactionStatus (status: Str)",
"source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n 'success': 'ok',\n };\n return this.safeString (statuses, status, status);\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: [
%{
auth: false,
cost: 4,
method: :post,
path: "/cancelOrder"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/checkDownline"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/createVoucher"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/getInfo"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/getOrder"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/listDownline"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/openOrders"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/orderHistory"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/trade"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/tradeHistory"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/transHistory"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/withdrawCoin"
},
%{
auth: false,
cost: 4,
method: :post,
path: "/withdrawFee"
}
],
public: [
%{
auth: false,
cost: 5,
method: :get,
path: "/api/depth/{pair}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/api/pairs"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/api/price_increments"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/api/server_time"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/api/summaries"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/api/ticker/{pair}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/api/ticker_all"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/api/trades/{pair}"
},
%{
auth: false,
cost: 5,
method: :get,
path: "/tradingview/history_v2"
}
]
},
required_credentials: %{
api_key: true,
password: false,
secret: true,
uid: false
},
requires_eddsa: false,
response_error: %{
code_field: nil,
field: "error",
message_field: "error",
success_values: nil,
type: :error_array
},
signing: %{
api_key_header: "Key",
confidence: :medium,
pattern: :hmac_sha512_nonce,
recv_window: 5000,
uses_recv_window: true
},
spec_format_version: 2,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{
"min" => 8.4e-6
},
"cost" => %{},
"price" => %{
"min" => 10000
}
},
sample_precision: %{
"amount" => 1.0e-8,
"price" => 1.0e-8
},
spot: %{
base: "BTC",
base_id: "btc",
case: :lower,
contract: false,
id: "btcidr",
limits: %{
"amount" => %{
"min" => 8.4e-6
},
"cost" => %{},
"leverage" => %{},
"price" => %{
"min" => 10000
}
},
maker: 0,
precision: %{
"amount" => 1.0e-8,
"cost" => 1,
"price" => 1.0e-8
},
quote: "IDR",
quote_id: "idr",
separator: "",
symbol: "BTC/IDR",
taker: 0.2
}
},
symbol_patterns: %{
spot: %{
case: :lower,
component_order: nil,
date_format: nil,
pattern: :no_separator_lower,
prefix: nil,
separator: "",
suffix: nil
}
},
timeframes: %{
"15m" => "15",
"1d" => "1D",
"1h" => "60",
"1m" => "1",
"1w" => "1W",
"30m" => "30",
"3d" => "3D",
"4h" => "240"
},
url_strategy: %{
detected_from: "fallback",
pattern: :no_prefix,
prefix: nil
},
urls: %{
api: "https://indodax.com",
api_sections: %{
"private" => "https://indodax.com/tapi",
"public" => "https://indodax.com"
},
doc: "https://github.com/btcid/indodax-official-api-docs",
other: nil,
sandbox: nil,
www: "https://www.indodax.com"
},
version: "2.0",
ws: nil
}