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

priv/specs/extracted/btcmarkets.exs

# BTC Markets Exchange Specification
#
# Auto-generated by: mix ccxt.extract btcmarkets
# 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: [
"AU"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 22,
"coveragePercent" => 100,
"enabledMethods" => 25,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchClosedOrders",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchTransactions",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 3,
"extractableMethods" => 22,
"failures" => []
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :delete,
name: :cancel_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/orders/{id}",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"ids" => [
nil
]
},
market_type: :spot,
method: :delete,
name: :cancel_orders,
param_mappings: %{},
params: [
:ids,
:symbol
],
path: "/batchorders/{ids}",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"side" => "Bid",
"type" => "Limit"
},
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/orders",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"side" => "Bid",
"type" => "Market"
},
market_type: :spot,
method: :post,
name: :create_market_order,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/orders",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"side" => "Bid"
},
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/orders",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"marketId" => "BTCUSDT",
"side" => "Bid",
"triggerDirection" => "below"
},
market_type: :swap,
method: :post,
name: :create_trigger_order,
param_mappings: %{},
params: [
:symbol,
:type,
:side,
:amount,
:price,
:triggerPrice
],
path: "/orders",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/accounts/me/balances",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_deposits,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/deposits",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_deposits_withdrawals,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/transfers",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:limit
],
path: "/markets/{marketId}/orderbook",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/markets",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_my_trades,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:since,
:limit
],
path: "/trades",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_ohlcv,
param_mappings: %{
"since" => "from",
"symbol" => "marketId",
"timeframe" => "timeWindow"
},
params: [
:symbol,
:timeframe,
:since,
:limit
],
path: "/markets/{marketId}/candles",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"status" => "open"
},
market_type: :spot,
method: :get,
name: :fetch_open_orders,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:since,
:limit
],
path: "/orders",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/orders/{id}",
response_transformer: {:extract_path_unwrap, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:limit
],
path: "/markets/{marketId}/orderbook",
response_transformer: {:extract_path_unwrap, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"status" => "all"
},
market_type: :spot,
method: :get,
name: :fetch_orders,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:since,
:limit
],
path: "/orders",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol
],
path: "/markets/{marketId}/ticker",
response_transformer: {:extract_path_unwrap, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_time,
param_mappings: %{},
params: [],
path: "/time",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"symbol" => "marketId"
},
params: [
:symbol,
:since,
:limit
],
path: "/markets/{marketId}/trades",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_withdrawals,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/withdrawals",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :withdraw,
param_mappings: %{
"address" => "toAddress",
"code" => "currency_id"
},
params: [
:code,
:amount,
:address,
:tag
],
path: "/withdrawals",
response_transformer: {:extract_path, ["snapshotId"]},
source: :intercepted
}
],
error_code_details: %{
"InsufficientFund" => %{
description: nil,
type: :insufficient_balance
},
"InvalidAmount" => %{
description: nil,
type: :invalid_order
},
"InvalidPaginationParameter" => %{
description: nil,
type: :invalid_parameters
},
"InvalidPrice" => %{
description: nil,
type: :invalid_order
},
"MissingArgument" => %{
description: nil,
type: :invalid_parameters
},
"OrderAlreadyCancelled" => %{
description: nil,
type: :invalid_order
},
"OrderNotFound" => %{
description: nil,
type: :order_not_found
},
"OrderStatusIsFinal" => %{
description: nil,
type: :invalid_order
}
},
error_codes: %{
"InsufficientFund" => :insufficient_balance,
"InvalidAmount" => :invalid_order,
"InvalidPaginationParameter" => :invalid_parameters,
"InvalidPrice" => :invalid_order,
"MissingArgument" => :invalid_parameters,
"OrderAlreadyCancelled" => :invalid_order,
"OrderNotFound" => :order_not_found,
"OrderStatusIsFinal" => :invalid_order
},
exceptions: %{
exact: %{
"InsufficientFund" => :insufficient_funds,
"InvalidAmount" => :invalid_order,
"InvalidPaginationParameter" => :bad_request,
"InvalidPrice" => :invalid_order,
"MissingArgument" => :bad_request,
"OrderAlreadyCancelled" => :invalid_order,
"OrderNotFound" => :order_not_found,
"OrderStatusIsFinal" => :invalid_order
}
},
exchange_options: %{
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"fees" => %{
"AUD" => %{
"maker" => 0.0085,
"taker" => 0.0085
}
},
"networksById" => %{}
},
extended_metadata: %{
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://github.com/user-attachments/assets/8c8d6907-3873-4cc4-ad20-e22fba28247e"
},
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: true,
stop_loss_price: false,
take_profit_price: false,
time_in_force: %{
fok: true,
gtd: false,
ioc: true,
po: true
},
trailing: false,
trigger_direction: false,
trigger_price: true
},
fetch_closed_orders: %{
days_back: 100000,
days_back_canceled: 1,
limit: 100,
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false,
until_days: 100000
},
fetch_my_trades: %{
days_back: 100000,
limit: 100,
margin_mode: false,
symbol_required: true,
until_days: 100000
},
fetch_ohlcv: %{
limit: 1000
},
fetch_open_orders: %{
limit: 100,
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_orders: %{
days_back: 100000,
limit: 100,
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false,
until_days: 100000
},
sandbox: false
},
swap: %{}
},
fees: %{
tier_based: true
},
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 // {\"code\":\"UnAuthorized\",\"message\":\"invalid access token\"}\n // {\"code\":\"MarketNotFound\",\"message\":\"invalid marketId\"}\n //\n const errorCode = this.safeString(response, 'code');\n const message = this.safeString(response, 'message');\n if (errorCode !== undefined) {\n const feedback = this.id + ' ' + body;\n this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], errorCode, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], message, 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: true,
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: true,
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: 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: false,
fetch_deposit_addresses: false,
fetch_deposit_addresses_by_network: false,
fetch_deposit_withdraw_fee: false,
fetch_deposit_withdraw_fees: false,
fetch_deposits: true,
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: true,
fetch_ohlcv_ws: false,
fetch_open_interest: false,
fetch_open_interest_history: false,
fetch_open_interests: false,
fetch_open_order: false,
fetch_open_orders: true,
fetch_open_orders_ws: false,
fetch_option: false,
fetch_option_chain: false,
fetch_order: true,
fetch_order_book: true,
fetch_order_book_ws: false,
fetch_order_books: false,
fetch_order_trades: false,
fetch_order_with_client_order_id: false,
fetch_order_ws: false,
fetch_orders: 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: 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: 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: true,
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: "btcmarkets",
markets: nil,
name: "BTC Markets",
ohlcv_timestamp_resolution: :unknown,
options: %{
"fees" => %{
"AUD" => %{
"maker" => 0.0085,
"taker" => 0.0085
}
}
},
order_mappings: %{
side_format: nil,
side_key: "side",
type_format: :capitalize,
type_key: "type"
},
param_mappings: %{
"address" => "toAddress",
"code" => "currency_id",
"since" => "from",
"symbol" => "marketId",
"timeframe" => "timeWindow"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 614,
"line_start" => 602,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const result: Dict = { 'info': response };\n for (let i = 0; i < response.length; i++) {\n const balance = response[i];\n const currencyId = this.safeString (balance, 'assetName');\n const code = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['used'] = this.safeString (balance, 'locked');\n account['total'] = this.safeString (balance, 'balance');\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 582,
"line_start" => 515,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "base",
"value" => "base"
},
%{
"comment" => nil,
"key" => "quote",
"value" => "quote"
},
%{
"comment" => nil,
"key" => "settle",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseId",
"value" => "baseId"
},
%{
"comment" => nil,
"key" => "quoteId",
"value" => "quoteId"
},
%{
"comment" => nil,
"key" => "settleId",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "'spot'"
},
%{
"comment" => nil,
"key" => "spot",
"value" => "true"
},
%{
"comment" => nil,
"key" => "margin",
"value" => "false"
},
%{
"comment" => nil,
"key" => "swap",
"value" => "false"
},
%{
"comment" => nil,
"key" => "future",
"value" => "false"
},
%{
"comment" => nil,
"key" => "option",
"value" => "false"
},
%{
"comment" => nil,
"key" => "active",
"value" => "(status === 'Online')"
},
%{
"comment" => nil,
"key" => "contract",
"value" => "false"
},
%{
"comment" => nil,
"key" => "linear",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "inverse",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "taker",
"value" => "fees['taker']"
},
%{
"comment" => nil,
"key" => "maker",
"value" => "fees['maker']"
},
%{
"comment" => nil,
"key" => "contractSize",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "expiry",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "expiryDatetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "strike",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "optionType",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "precision",
"value" => "{\n 'amount': this.parseNumber (this.parsePrecision (this.safeString (market, 'amountDecimals'))),\n 'price': pricePrecision,\n }"
},
%{
"comment" => nil,
"key" => "limits",
"value" => "{\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': minAmount,\n 'max': maxAmount,\n },\n 'price': {\n 'min': minPrice,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n }"
},
%{
"comment" => nil,
"key" => "created",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "market"
},
%{
"comment" => nil,
"key" => "leverage",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "{\n 'min': minAmount,\n 'max': maxAmount,\n }"
},
%{
"comment" => nil,
"key" => "price",
"value" => "{\n 'min': minPrice,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
}
],
"name" => "parseMarket",
"signature" => "parseMarket (market: Dict): Market",
"source" => "parseMarket (market: Dict): Market {\n const baseId = this.safeString (market, 'baseAssetName');\n const quoteId = this.safeString (market, 'quoteAssetName');\n const id = this.safeString (market, 'marketId');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n const symbol = base + '/' + quote;\n const fees = this.safeValue (this.safeDict (this.options, 'fees', {}), quote, this.fees);\n const pricePrecision = this.parseNumber (this.parsePrecision (this.safeString (market, 'priceDecimals')));\n const minAmount = this.safeNumber (market, 'minOrderAmount');\n const maxAmount = this.safeNumber (market, 'maxOrderAmount');\n const status = this.safeString (market, 'status');\n let minPrice = undefined;\n if (quote === 'AUD') {\n minPrice = pricePrecision;\n }\n return {\n 'id': id,\n 'symbol': symbol,\n 'base': base,\n 'quote': quote,\n 'settle': undefined,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': undefined,\n 'type': 'spot',\n 'spot': true,\n 'margin': false,\n 'swap': false,\n 'future': false,\n 'option': false,\n 'active': (status === 'Online'),\n 'contract': false,\n 'linear': undefined,\n 'inverse': undefined,\n 'taker': fees['taker'],\n 'maker': fees['maker'],\n 'contractSize': undefined,\n 'expiry': undefined,\n 'expiryDatetime': undefined,\n 'strike': undefined,\n 'optionType': undefined,\n 'precision': {\n 'amount': this.parseNumber (this.parsePrecision (this.safeString (market, 'amountDecimals'))),\n 'price': pricePrecision,\n },\n 'limits': {\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': minAmount,\n 'max': maxAmount,\n },\n 'price': {\n 'min': minPrice,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n },\n 'created': undefined,\n 'info': market,\n };\n }"
},
%{
"comment" => nil,
"examples" => [
"[\n \"2020-09-12T18:30:00.000000Z\",\n \"14409.45\", // open\n \"14409.45\", // high\n \"14403.91\", // low\n \"14403.91\", // close\n \"0.01571701\" // volume\n ]"
],
"line_end" => 649,
"line_start" => 630,
"mappings" => [],
"name" => "parseOHLCV",
"signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV",
"source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // [\n // \"2020-09-12T18:30:00.000000Z\",\n // \"14409.45\", // open\n // \"14409.45\", // high\n // \"14403.91\", // low\n // \"14403.91\", // close\n // \"0.01571701\" // volume\n // ]\n //\n return [\n this.parse8601 (this.safeString (ohlcv, 0)),\n this.safeNumber (ohlcv, 1), // open\n this.safeNumber (ohlcv, 2), // high\n this.safeNumber (ohlcv, 3), // low\n this.safeNumber (ohlcv, 4), // close\n this.safeNumber (ohlcv, 5), // volume\n ];\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"orderId\": \"7524\",\n \"marketId\": \"BTC-AUD\",\n \"side\": \"Bid\",\n \"type\": \"Limit\",\n \"creationTime\": \"2019-08-30T11:08:21.956000Z\",\n \"price\": \"100.12\",\n \"amount\": \"1.034\",\n \"openAmount\": \"1.034\",\n \"status\": \"Accepted\",\n \"clientOrderId\": \"1234-5678\",\n \"timeInForce\": \"IOC\",\n \"postOnly\": false,\n \"selfTrade\": \"P\",\n \"triggerAmount\": \"105\",\n \"targetAmount\": \"1000\"\n }"
],
"line_end" => 1202,
"line_start" => 1139,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"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" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "timeInForce"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "postOnly"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "this.safeNumber (order, 'triggerPrice')"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remaining"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
},
%{
"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 // createOrder\n //\n // {\n // \"orderId\": \"7524\",\n // \"marketId\": \"BTC-AUD\",\n // \"side\": \"Bid\",\n // \"type\": \"Limit\",\n // \"creationTime\": \"2019-08-30T11:08:21.956000Z\",\n // \"price\": \"100.12\",\n // \"amount\": \"1.034\",\n // \"openAmount\": \"1.034\",\n // \"status\": \"Accepted\",\n // \"clientOrderId\": \"1234-5678\",\n // \"timeInForce\": \"IOC\",\n // \"postOnly\": false,\n // \"selfTrade\": \"P\",\n // \"triggerAmount\": \"105\",\n // \"targetAmount\": \"1000\"\n // }\n //\n const timestamp = this.parse8601 (this.safeString (order, 'creationTime'));\n const marketId = this.safeString (order, 'marketId');\n market = this.safeMarket (marketId, market, '-');\n let side = this.safeString (order, 'side');\n if (side === 'Bid') {\n side = 'buy';\n } else if (side === 'Ask') {\n side = 'sell';\n }\n const type = this.safeStringLower (order, 'type');\n const price = this.safeString (order, 'price');\n const amount = this.safeString (order, 'amount');\n const remaining = this.safeString (order, 'openAmount');\n const status = this.parseOrderStatus (this.safeString (order, 'status'));\n const id = this.safeString (order, 'orderId');\n const clientOrderId = this.safeString (order, 'clientOrderId');\n const timeInForce = this.safeString (order, 'timeInForce');\n const postOnly = this.safeBool (order, 'postOnly');\n return this.safeOrder ({\n 'info': order,\n 'id': id,\n 'clientOrderId': clientOrderId,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'symbol': market['symbol'],\n 'type': type,\n 'timeInForce': timeInForce,\n 'postOnly': postOnly,\n 'side': side,\n 'price': price,\n 'triggerPrice': this.safeNumber (order, 'triggerPrice'),\n 'cost': undefined,\n 'amount': amount,\n 'filled': undefined,\n 'remaining': remaining,\n 'average': undefined,\n 'status': status,\n 'trades': undefined,\n 'fee': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1137,
"line_start" => 1126,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: Str)",
"source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'Accepted': 'open',\n 'Placed': 'open',\n 'Partially Matched': 'open',\n 'Fully Matched': 'closed',\n 'Cancelled': 'canceled',\n 'Partially Cancelled': 'canceled',\n 'Failed': 'rejected',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"marketId\":\"BAT-AUD\",\n \"bestBid\":\"0.3751\",\n \"bestAsk\":\"0.377\",\n \"lastPrice\":\"0.3769\",\n \"volume24h\":\"56192.97613335\",\n \"volumeQte24h\":\"21179.13270465\",\n \"price24h\":\"0.0119\",\n \"pricePct24h\":\"3.26\",\n \"low24h\":\"0.3611\",\n \"high24h\":\"0.3799\",\n \"timestamp\":\"2020-08-09T18:28:23.280000Z\"\n }"
],
"line_end" => 780,
"line_start" => 731,
"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, 'high24h')"
},
%{
"comment" => nil,
"key" => "low",
"value" => "this.safeString (ticker, 'low')"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeString (ticker, 'bestBid')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeString (ticker, 'bestAsk')"
},
%{
"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" => "change"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "percentage"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "baseVolume"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "quoteVolume"
},
%{
"comment" => nil,
"key" => "info",
"value" => "ticker"
}
],
"name" => "parseTicker",
"signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker",
"source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // fetchTicker\n //\n // {\n // \"marketId\":\"BAT-AUD\",\n // \"bestBid\":\"0.3751\",\n // \"bestAsk\":\"0.377\",\n // \"lastPrice\":\"0.3769\",\n // \"volume24h\":\"56192.97613335\",\n // \"volumeQte24h\":\"21179.13270465\",\n // \"price24h\":\"0.0119\",\n // \"pricePct24h\":\"3.26\",\n // \"low24h\":\"0.3611\",\n // \"high24h\":\"0.3799\",\n // \"timestamp\":\"2020-08-09T18:28:23.280000Z\"\n // }\n //\n const marketId = this.safeString (ticker, 'marketId');\n market = this.safeMarket (marketId, market, '-');\n const symbol = market['symbol'];\n const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp'));\n const last = this.safeString (ticker, 'lastPrice');\n const baseVolume = this.safeString (ticker, 'volume24h');\n const quoteVolume = this.safeString (ticker, 'volumeQte24h');\n const change = this.safeString (ticker, 'price24h');\n const percentage = this.safeString (ticker, 'pricePct24h');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': this.safeString (ticker, 'high24h'),\n 'low': this.safeString (ticker, 'low'),\n 'bid': this.safeString (ticker, 'bestBid'),\n 'bidVolume': undefined,\n 'ask': this.safeString (ticker, 'bestAsk'),\n 'askVolume': undefined,\n 'vwap': undefined,\n 'open': undefined,\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': change,\n 'percentage': percentage,\n 'average': undefined,\n 'baseVolume': baseVolume,\n 'quoteVolume': quoteVolume,\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\":\"6191646611\",\n \"price\":\"539.98\",\n \"amount\":\"0.5\",\n \"timestamp\":\"2020-08-09T15:21:05.016000Z\",\n \"side\":\"Ask\"\n }",
"{\n \"id\": \"36014819\",\n \"marketId\": \"XRP-AUD\",\n \"timestamp\": \"2019-06-25T16:01:02.977000Z\",\n \"price\": \"0.67\",\n \"amount\": \"1.50533262\",\n \"side\": \"Ask\",\n \"fee\": \"0.00857285\",\n \"orderId\": \"3648306\",\n \"liquidityType\": \"Taker\",\n \"clientOrderId\": \"48\"\n }"
],
"line_end" => 891,
"line_start" => 826,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"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" => "price",
"value" => "priceString"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "takerOrMaker"
},
%{
"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 // public fetchTrades\n //\n // {\n // \"id\":\"6191646611\",\n // \"price\":\"539.98\",\n // \"amount\":\"0.5\",\n // \"timestamp\":\"2020-08-09T15:21:05.016000Z\",\n // \"side\":\"Ask\"\n // }\n //\n // private fetchMyTrades\n //\n // {\n // \"id\": \"36014819\",\n // \"marketId\": \"XRP-AUD\",\n // \"timestamp\": \"2019-06-25T16:01:02.977000Z\",\n // \"price\": \"0.67\",\n // \"amount\": \"1.50533262\",\n // \"side\": \"Ask\",\n // \"fee\": \"0.00857285\",\n // \"orderId\": \"3648306\",\n // \"liquidityType\": \"Taker\",\n // \"clientOrderId\": \"48\"\n // }\n //\n const timestamp = this.parse8601 (this.safeString (trade, 'timestamp'));\n const marketId = this.safeString (trade, 'marketId');\n market = this.safeMarket (marketId, market, '-');\n const feeCurrencyCode = (market['quote'] === 'AUD') ? market['quote'] : market['base'];\n let side = this.safeString (trade, 'side');\n if (side === 'Bid') {\n side = 'buy';\n } else if (side === 'Ask') {\n side = 'sell';\n }\n const id = this.safeString (trade, 'id');\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'amount');\n const orderId = this.safeString (trade, 'orderId');\n let fee = undefined;\n const feeCostString = this.safeString (trade, 'fee');\n if (feeCostString !== undefined) {\n fee = {\n 'cost': feeCostString,\n 'currency': feeCurrencyCode,\n };\n }\n const takerOrMaker = this.safeStringLower (trade, 'liquidityType');\n return this.safeTrade ({\n 'info': trade,\n 'id': id,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'order': orderId,\n 'symbol': market['symbol'],\n 'type': undefined,\n 'side': side,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'takerOrMaker': takerOrMaker,\n 'fee': fee,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": \"6500230339\",\n \"assetName\": \"XRP\",\n \"amount\": \"500\",\n \"type\": \"Deposit\",\n \"creationTime\": \"2020-07-27T07:52:08.640000Z\",\n \"status\": \"Complete\",\n \"description\": \"RIPPLE Deposit, XRP 500\",\n \"fee\": \"0\",\n \"lastUpdate\": \"2020-07-27T07:52:08.665000Z\",\n \"paymentDetail\": {\n \"txId\": \"lsjflsjdfljsd\",\n \"address\": \"kjasfkjsdf?dt=873874545\"\n }\n }",
"{\n \"id\": \"500985282\",\n \"assetName\": \"BTC\",\n \"amount\": \"0.42570126\",\n \"type\": \"Withdraw\",\n \"creationTime\": \"2017-07-29T12:49:03.931000Z\",\n \"status\": \"Complete\",\n \"description\": \"BTC withdraw from [nick-btcmarkets@snowmonkey.co.uk] to Address: 1B9DsnSYQ54VMqFHVJYdGoLMCYzFwrQzsj amount: 0.42570126 fee: 0.00000000\",\n \"fee\": \"0.0005\",\n \"lastUpdate\": \"2017-07-29T12:52:20.676000Z\",\n \"paymentDetail\": {\n \"txId\": \"fkjdsfjsfljsdfl\",\n \"address\": \"a;daddjas;djas\"\n }\n }",
"{\n \"id\": \"505102262\",\n \"assetName\": \"XRP\",\n \"amount\": \"979.836\",\n \"type\": \"Deposit\",\n \"creationTime\": \"2017-07-31T08:50:01.053000Z\",\n \"status\": \"Complete\",\n \"description\": \"Ripple Deposit, X 979.8360\",\n \"fee\": \"0\",\n \"lastUpdate\": \"2017-07-31T08:50:01.290000Z\"\n }"
],
"line_end" => 486,
"line_start" => 384,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (transaction, 'id')"
},
%{
"comment" => nil,
"key" => "txid",
"value" => "txid"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "network",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "address"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "addressTo"
},
%{
"comment" => nil,
"key" => "addressFrom",
"value" => "addressFrom"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "tag"
},
%{
"comment" => nil,
"key" => "tagTo",
"value" => "tagTo"
},
%{
"comment" => nil,
"key" => "tagFrom",
"value" => "tagFrom"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.parseNumber (amount)"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "code"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "updated",
"value" => "lastUpdate"
},
%{
"comment" => nil,
"key" => "comment",
"value" => "this.safeString (transaction, 'description')"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "{\n 'currency': code,\n 'cost': this.parseNumber (fee),\n 'rate': undefined,\n }"
},
%{
"comment" => nil,
"key" => "info",
"value" => "transaction"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "this.parseNumber (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 // {\n // \"id\": \"6500230339\",\n // \"assetName\": \"XRP\",\n // \"amount\": \"500\",\n // \"type\": \"Deposit\",\n // \"creationTime\": \"2020-07-27T07:52:08.640000Z\",\n // \"status\": \"Complete\",\n // \"description\": \"RIPPLE Deposit, XRP 500\",\n // \"fee\": \"0\",\n // \"lastUpdate\": \"2020-07-27T07:52:08.665000Z\",\n // \"paymentDetail\": {\n // \"txId\": \"lsjflsjdfljsd\",\n // \"address\": \"kjasfkjsdf?dt=873874545\"\n // }\n // }\n //\n // {\n // \"id\": \"500985282\",\n // \"assetName\": \"BTC\",\n // \"amount\": \"0.42570126\",\n // \"type\": \"Withdraw\",\n // \"creationTime\": \"2017-07-29T12:49:03.931000Z\",\n // \"status\": \"Complete\",\n // \"description\": \"BTC withdraw from [nick-btcmarkets@snowmonkey.co.uk] to Address: 1B9DsnSYQ54VMqFHVJYdGoLMCYzFwrQzsj amount: 0.42570126 fee: 0.00000000\",\n // \"fee\": \"0.0005\",\n // \"lastUpdate\": \"2017-07-29T12:52:20.676000Z\",\n // \"paymentDetail\": {\n // \"txId\": \"fkjdsfjsfljsdfl\",\n // \"address\": \"a;daddjas;djas\"\n // }\n // }\n //\n // {\n // \"id\": \"505102262\",\n // \"assetName\": \"XRP\",\n // \"amount\": \"979.836\",\n // \"type\": \"Deposit\",\n // \"creationTime\": \"2017-07-31T08:50:01.053000Z\",\n // \"status\": \"Complete\",\n // \"description\": \"Ripple Deposit, X 979.8360\",\n // \"fee\": \"0\",\n // \"lastUpdate\": \"2017-07-31T08:50:01.290000Z\"\n // }\n //\n const timestamp = this.parse8601 (this.safeString (transaction, 'creationTime'));\n const lastUpdate = this.parse8601 (this.safeString (transaction, 'lastUpdate'));\n let type = this.parseTransactionType (this.safeStringLower (transaction, 'type'));\n if (type === 'withdraw') {\n type = 'withdrawal';\n }\n const cryptoPaymentDetail = this.safeDict (transaction, 'paymentDetail', {});\n const txid = this.safeString (cryptoPaymentDetail, 'txId');\n let address = this.safeString (cryptoPaymentDetail, 'address');\n let tag = undefined;\n if (address !== undefined) {\n const addressParts = address.split ('?dt=');\n const numParts = addressParts.length;\n if (numParts > 1) {\n address = addressParts[0];\n tag = addressParts[1];\n }\n }\n const addressTo = address;\n const tagTo = tag;\n const addressFrom = undefined;\n const tagFrom = undefined;\n const fee = this.safeString (transaction, 'fee');\n const status = this.parseTransactionStatus (this.safeString (transaction, 'status'));\n const currencyId = this.safeString (transaction, 'assetName');\n const code = this.safeCurrencyCode (currencyId);\n let amount = this.safeString (transaction, 'amount');\n if (fee) {\n amount = Precise.stringSub (amount, fee);\n }\n return {\n 'id': this.safeString (transaction, 'id'),\n 'txid': txid,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': undefined,\n 'address': address,\n 'addressTo': addressTo,\n 'addressFrom': addressFrom,\n 'tag': tag,\n 'tagTo': tagTo,\n 'tagFrom': tagFrom,\n 'type': type,\n 'amount': this.parseNumber (amount),\n 'currency': code,\n 'status': status,\n 'updated': lastUpdate,\n 'comment': this.safeString (transaction, 'description'),\n 'internal': undefined,\n 'fee': {\n 'currency': code,\n 'cost': this.parseNumber (fee),\n 'rate': undefined,\n },\n 'info': transaction,\n } as Transaction;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 374,
"line_start" => 365,
"mappings" => [],
"name" => "parseTransactionStatus",
"signature" => "parseTransactionStatus (status: Str)",
"source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n 'Accepted': 'pending',\n 'Pending Authorization': 'pending',\n 'Complete': 'ok',\n 'Cancelled': 'cancelled',\n 'Failed': 'failed',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 382,
"line_start" => 376,
"mappings" => [],
"name" => "parseTransactionType",
"signature" => "parseTransactionType (type)",
"source" => "parseTransactionType (type) {\n const statuses: Dict = {\n 'Withdraw': 'withdrawal',\n 'Deposit': 'deposit',\n };\n return this.safeString (statuses, type, type);\n }"
}
],
path_prefix: "/v3/",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 1000,
period: 1000,
requests: 1,
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: %{
api_key_header: "BM-AUTH-APIKEY",
confidence: :medium,
pattern: :hmac_sha512_nonce,
signature_encoding: :base64,
signature_header: "BM-AUTH-SIGNATURE",
timestamp_header: "BM-AUTH-TIMESTAMP"
},
spec_format_version: 1,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{
"max" => 1000000,
"min" => 0.005
},
"cost" => %{},
"price" => %{
"min" => 0.01
}
},
sample_precision: %{
"amount" => 1.0e-8,
"price" => 0.01
},
spot: %{
base: "AAVE",
base_id: "AAVE",
case: :upper,
contract: false,
id: "AAVE-AUD",
limits: %{
"amount" => %{
"max" => 1000000,
"min" => 0.005
},
"cost" => %{},
"leverage" => %{},
"price" => %{
"min" => 0.01
}
},
maker: 0.0085,
precision: %{
"amount" => 1.0e-8,
"price" => 0.01
},
quote: "AUD",
quote_id: "AUD",
separator: "-",
symbol: "AAVE/AUD",
taker: 0.0085
}
},
symbol_patterns: %{
spot: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :dash_upper,
separator: "-",
suffix: nil
}
},
timeframes: %{
"1d" => "1d",
"1h" => "1h",
"1m" => "1m"
},
url_strategy: %{
detected_from: "sign_method",
pattern: :version_slash,
prefix: "/v3/"
},
urls: %{
api: "https://api.btcmarkets.net",
api_sections: %{
"private" => "https://api.btcmarkets.net",
"public" => "https://api.btcmarkets.net"
},
doc: [
"https://api.btcmarkets.net/doc/v3",
"https://github.com/BTCMarkets/API"
],
other: nil,
sandbox: nil,
www: "https://btcmarkets.net"
},
version: "v3",
ws: nil
}