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

priv/specs/extracted/bitbank.exs

# bitbank Exchange Specification
#
# Auto-generated by: mix ccxt.extract bitbank
# 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: [
"JP"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 16,
"coveragePercent" => 100,
"enabledMethods" => 18,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 1,
"extractableMethods" => 17,
"failures" => [
%{
"error" => "bitbank uuid is required for withdrawal",
"method" => "withdraw"
}
]
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1.66,
expects: :single,
market_type: :spot,
method: :post,
name: :cancel_order,
param_mappings: %{
"id" => "order_id",
"symbol" => "pair"
},
params: [
:id,
:symbol
],
path: "/user/spot/cancel_order",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.66,
default_params: %{
"type" => "limit"
},
expects: :single,
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/user/spot/order",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.66,
default_params: %{
"type" => "market"
},
expects: :single,
market_type: :spot,
method: :post,
name: :create_market_order,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/user/spot/order",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.66,
expects: :single,
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/user/spot/order",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/user/assets",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_deposit_address,
param_mappings: %{
"code" => "asset"
},
params: [
:code
],
path: "/user/withdrawal_account",
response_transformer: {:extract_path_unwrap, ["data", "accounts"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:limit
],
path: "/{pair}/depth",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "markets",
auth: false,
base_url: "https://api.{hostname}",
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/spot/pairs",
response_transformer: {:extract_path, ["data", "pairs"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_my_trades,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/user/spot/trade_history",
response_transformer: {:extract_path, ["data", "trades"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"candletype" => "1hour",
"yyyymmdd" => "20240101"
},
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_ohlcv,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:timeframe,
:since,
:limit
],
path: "/{pair}/candlestick/{candletype}/{yyyymmdd}",
response_transformer: {:extract_path, ["data", "candlestick"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_open_orders,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/user/spot/active_orders",
response_transformer: {:extract_path, ["data", "orders"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_order,
param_mappings: %{
"id" => "order_id",
"symbol" => "pair"
},
params: [
:id,
:symbol
],
path: "/user/spot/order",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:limit
],
path: "/{pair}/depth",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol
],
path: "/{pair}/ticker",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/{pair}/transactions",
response_transformer: {:extract_path, ["data", "transactions"]},
source: :intercepted
},
%{
api_section: "markets",
auth: false,
base_url: "https://api.{hostname}",
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_trading_fees,
param_mappings: %{},
params: [],
path: "/spot/pairs",
response_transformer: {:extract_path, ["data", "pairs"]},
source: :intercepted
}
],
error_code_details: %{
20001 => %{
description: nil,
type: :invalid_credentials
},
20002 => %{
description: nil,
type: :invalid_credentials
},
20003 => %{
description: nil,
type: :invalid_credentials
},
20004 => %{
description: nil,
type: :invalid_credentials
},
20005 => %{
description: nil,
type: :invalid_credentials
},
40013 => %{
description: nil,
type: :order_not_found
},
40014 => %{
description: nil,
type: :order_not_found
},
40020 => %{
description: nil,
type: :invalid_order
},
40021 => %{
description: nil,
type: :invalid_order
},
40025 => %{
description: nil,
type: :exchange_error
},
50008 => %{
description: nil,
type: :access_restricted
},
50009 => %{
description: nil,
type: :order_not_found
},
50010 => %{
description: nil,
type: :order_not_found
},
60001 => %{
description: nil,
type: :insufficient_balance
},
60005 => %{
description: nil,
type: :invalid_order
}
},
error_codes: %{
20001 => :invalid_credentials,
20002 => :invalid_credentials,
20003 => :invalid_credentials,
20004 => :invalid_credentials,
20005 => :invalid_credentials,
40013 => :order_not_found,
40014 => :order_not_found,
40020 => :invalid_order,
40021 => :invalid_order,
40025 => :exchange_error,
50008 => :access_restricted,
50009 => :order_not_found,
50010 => :order_not_found,
60001 => :insufficient_balance,
60005 => :invalid_order
},
exceptions: %{
exact: %{
"20001" => :authentication_error,
"20002" => :authentication_error,
"20003" => :authentication_error,
"20004" => :invalid_nonce,
"20005" => :authentication_error,
"40013" => :order_not_found,
"40014" => :order_not_found,
"40020" => :invalid_order,
"40021" => :invalid_order,
"40025" => :exchange_error,
"50008" => :permission_denied,
"50009" => :order_not_found,
"50010" => :order_not_found,
"60001" => :insufficient_funds,
"60005" => :invalid_order
}
},
exchange_options: %{
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"networksById" => %{}
},
extended_metadata: %{
fees_url: "https://bitbank.cc/docs/fees/",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://github.com/user-attachments/assets/9d616de0-8a88-4468-8e38-d269acab0348"
},
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: false,
po: true
},
trailing: false,
trigger_direction: false,
trigger_price: true
},
fetch_my_trades: %{
limit: 1000,
margin_mode: false,
symbol_required: false
},
fetch_ohlcv: %{
limit: 1000
},
fetch_open_orders: %{
limit: 1000,
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
sandbox: false
},
swap: %{}
},
fees: nil,
forward_aliases: nil,
handle_content_type_application_zip: nil,
handle_errors_source: "handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n if (response === undefined) {\n return undefined;\n }\n const success = this.safeInteger(response, 'success');\n const data = this.safeValue(response, 'data');\n if (!success || !data) {\n const errorMessages = {\n '10000': 'URL does not exist',\n '10001': 'A system error occurred. Please contact support',\n '10002': 'Invalid JSON format. Please check the contents of transmission',\n '10003': 'A system error occurred. Please contact support',\n '10005': 'A timeout error occurred. Please wait for a while and try again',\n '20001': 'API authentication failed',\n '20002': 'Illegal API key',\n '20003': 'API key does not exist',\n '20004': 'API Nonce does not exist',\n '20005': 'API signature does not exist',\n '20011': 'Two-step verification failed',\n '20014': 'SMS authentication failed',\n '30001': 'Please specify the order quantity',\n '30006': 'Please specify the order ID',\n '30007': 'Please specify the order ID array',\n '30009': 'Please specify the stock',\n '30012': 'Please specify the order price',\n '30013': 'Trade Please specify either',\n '30015': 'Please specify the order type',\n '30016': 'Please specify asset name',\n '30019': 'Please specify uuid',\n '30039': 'Please specify the amount to be withdrawn',\n '40001': 'The order quantity is invalid',\n '40006': 'Count value is invalid',\n '40007': 'End time is invalid',\n '40008': 'end_id Value is invalid',\n '40009': 'The from_id value is invalid',\n '40013': 'The order ID is invalid',\n '40014': 'The order ID array is invalid',\n '40015': 'Too many specified orders',\n '40017': 'Incorrect issue name',\n '40020': 'The order price is invalid',\n '40021': 'The trading classification is invalid',\n '40022': 'Start date is invalid',\n '40024': 'The order type is invalid',\n '40025': 'Incorrect asset name',\n '40028': 'uuid is invalid',\n '40048': 'The amount of withdrawal is illegal',\n '50003': 'Currently, this account is in a state where you can not perform the operation you specified. Please contact support',\n '50004': 'Currently, this account is temporarily registered. Please try again after registering your account',\n '50005': 'Currently, this account is locked. Please contact support',\n '50006': 'Currently, this account is locked. Please contact support',\n '50008': 'User identification has not been completed',\n '50009': 'Your order does not exist',\n '50010': 'Can not cancel specified order',\n '50011': 'API not found',\n '60001': 'The number of possessions is insufficient',\n '60002': 'It exceeds the quantity upper limit of the tender buying order',\n '60003': 'The specified quantity exceeds the limit',\n '60004': 'The specified quantity is below the threshold',\n '60005': 'The specified price is above the limit',\n '60006': 'The specified price is below the lower limit',\n '70001': 'A system error occurred. Please contact support',\n '70002': 'A system error occurred. Please contact support',\n '70003': 'A system error occurred. Please contact support',\n '70004': 'We are unable to accept orders as the transaction is currently suspended',\n '70005': 'Order can not be accepted because purchase order is currently suspended',\n '70006': 'We can not accept orders because we are currently unsubscribed ',\n '70009': 'We are currently temporarily restricting orders to be carried out. Please use the limit order.',\n '70010': 'We are temporarily raising the minimum order quantity as the system load is now rising.',\n };\n const code = this.safeString(data, 'code');\n const message = this.safeString(errorMessages, code, 'Error');\n this.throwExactlyMatchedException(this.exceptions['exact'], code, message);\n throw new errors.ExchangeError(this.id + ' ' + this.json(response));\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: 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_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: false,
fetch_currencies_ws: true,
fetch_deposit: false,
fetch_deposit_address: true,
fetch_deposit_addresses: false,
fetch_deposit_addresses_by_network: false,
fetch_deposit_withdraw_fee: false,
fetch_deposit_withdraw_fees: false,
fetch_deposits: false,
fetch_deposits_withdrawals: false,
fetch_deposits_ws: false,
fetch_funding_history: false,
fetch_funding_interval: false,
fetch_funding_intervals: false,
fetch_funding_rate: false,
fetch_funding_rate_history: false,
fetch_funding_rates: false,
fetch_greeks: false,
fetch_index_ohlcv: false,
fetch_isolated_borrow_rate: false,
fetch_isolated_borrow_rates: false,
fetch_isolated_positions: false,
fetch_l2_order_book: true,
fetch_l3_order_book: false,
fetch_last_prices: false,
fetch_ledger: 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: false,
fetch_orders_by_status: false,
fetch_orders_ws: false,
fetch_position: false,
fetch_position_a_d_l_rank: 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: false,
fetch_trades: true,
fetch_trades_ws: false,
fetch_trading_fee: false,
fetch_trading_fees: true,
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,
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: "bitbank",
markets: nil,
name: "bitbank",
ohlcv_timestamp_resolution: :unknown,
options: %{},
order_mappings: %{
side_format: :lowercase,
side_key: "side",
type_format: :lowercase,
type_key: "type"
},
param_mappings: %{
"code" => "asset",
"id" => "order_id",
"symbol" => "pair"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 661,
"line_start" => 642,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const result: Dict = {\n 'info': response,\n 'timestamp': undefined,\n 'datetime': undefined,\n };\n const data = this.safeValue (response, 'data', {});\n const assets = this.safeValue (data, 'assets', []);\n for (let i = 0; i < assets.length; i++) {\n const balance = assets[i];\n const currencyId = this.safeString (balance, 'asset');\n const code = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['free'] = this.safeString (balance, 'free_amount');\n account['used'] = this.safeString (balance, 'locked_amount');\n account['total'] = this.safeString (balance, 'onhand_amount');\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 368,
"line_start" => 311,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "base + '/' + quote"
},
%{
"comment" => nil,
"key" => "base",
"value" => "base"
},
%{
"comment" => nil,
"key" => "quote",
"value" => "quote"
},
%{
"comment" => nil,
"key" => "settle",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseId",
"value" => "baseId"
},
%{
"comment" => nil,
"key" => "quoteId",
"value" => "quoteId"
},
%{
"comment" => nil,
"key" => "settleId",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "'spot'"
},
%{
"comment" => nil,
"key" => "spot",
"value" => "true"
},
%{
"comment" => nil,
"key" => "margin",
"value" => "false"
},
%{
"comment" => nil,
"key" => "swap",
"value" => "false"
},
%{
"comment" => nil,
"key" => "future",
"value" => "false"
},
%{
"comment" => nil,
"key" => "option",
"value" => "false"
},
%{
"comment" => nil,
"key" => "active",
"value" => "this.safeValue (entry, 'is_enabled')"
},
%{
"comment" => nil,
"key" => "contract",
"value" => "false"
},
%{
"comment" => nil,
"key" => "linear",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "inverse",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "taker",
"value" => "this.safeNumber (entry, 'taker_fee_rate_quote')"
},
%{
"comment" => nil,
"key" => "maker",
"value" => "this.safeNumber (entry, 'maker_fee_rate_quote')"
},
%{
"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 (entry, 'amount_digits'))),\n 'price': this.parseNumber (this.parsePrecision (this.safeString (entry, 'price_digits'))),\n }"
},
%{
"comment" => nil,
"key" => "limits",
"value" => "{\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': this.safeNumber (entry, 'unit_amount'),\n 'max': this.safeNumber (entry, 'limit_max_amount'),\n },\n 'price': {\n 'min': undefined,\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" => "entry"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.parseNumber (this.parsePrecision (this.safeString (entry, 'amount_digits')))"
},
%{
"comment" => nil,
"key" => "price",
"value" => "this.parseNumber (this.parsePrecision (this.safeString (entry, 'price_digits')))"
},
%{
"comment" => nil,
"key" => "leverage",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "{\n 'min': this.safeNumber (entry, 'unit_amount'),\n 'max': this.safeNumber (entry, 'limit_max_amount'),\n }"
},
%{
"comment" => nil,
"key" => "price",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "min",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "max",
"value" => "undefined"
}
],
"name" => "parseMarket",
"signature" => "parseMarket (entry): Market",
"source" => "parseMarket (entry): Market {\n const id = this.safeString (entry, 'name');\n const baseId = this.safeString (entry, 'base_asset');\n const quoteId = this.safeString (entry, 'quote_asset');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n return {\n 'id': id,\n 'symbol': base + '/' + quote,\n 'base': base,\n 'quote': quote,\n 'settle': undefined,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': undefined,\n 'type': 'spot',\n 'spot': true,\n 'margin': false,\n 'swap': false,\n 'future': false,\n 'option': false,\n 'active': this.safeValue (entry, 'is_enabled'),\n 'contract': false,\n 'linear': undefined,\n 'inverse': undefined,\n 'taker': this.safeNumber (entry, 'taker_fee_rate_quote'),\n 'maker': this.safeNumber (entry, 'maker_fee_rate_quote'),\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 (entry, 'amount_digits'))),\n 'price': this.parseNumber (this.parsePrecision (this.safeString (entry, 'price_digits'))),\n },\n 'limits': {\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': this.safeNumber (entry, 'unit_amount'),\n 'max': this.safeNumber (entry, 'limit_max_amount'),\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n },\n 'created': undefined,\n 'info': entry,\n };\n }"
},
%{
"comment" => nil,
"examples" => [
"[\n \"0.02501786\",\n \"0.02501786\",\n \"0.02501786\",\n \"0.02501786\",\n \"0.0000\",\n 1591488000000\n ]"
],
"line_end" => 587,
"line_start" => 568,
"mappings" => [],
"name" => "parseOHLCV",
"signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV",
"source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // [\n // \"0.02501786\",\n // \"0.02501786\",\n // \"0.02501786\",\n // \"0.02501786\",\n // \"0.0000\",\n // 1591488000000\n // ]\n //\n return [\n this.safeInteger (ohlcv, 5),\n this.safeNumber (ohlcv, 0),\n this.safeNumber (ohlcv, 1),\n this.safeNumber (ohlcv, 2),\n this.safeNumber (ohlcv, 3),\n this.safeNumber (ohlcv, 4),\n ];\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 757,
"line_start" => 721,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "lastTradeTimestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "average"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "filled"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remaining"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "order"
}
],
"name" => "parseOrder",
"signature" => "parseOrder (order: Dict, market: Market = undefined): Order",
"source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n const id = this.safeString (order, 'order_id');\n const marketId = this.safeString (order, 'pair');\n market = this.safeMarket (marketId, market);\n const timestamp = this.safeInteger (order, 'ordered_at');\n const price = this.safeString (order, 'price');\n const amount = this.safeString (order, 'start_amount');\n const filled = this.safeString (order, 'executed_amount');\n const remaining = this.safeString (order, 'remaining_amount');\n const average = this.safeString (order, 'average_price');\n const status = this.parseOrderStatus (this.safeString (order, 'status'));\n const type = this.safeStringLower (order, 'type');\n const side = this.safeStringLower (order, 'side');\n return this.safeOrder ({\n 'id': id,\n 'clientOrderId': undefined,\n 'datetime': this.iso8601 (timestamp),\n 'timestamp': timestamp,\n 'lastTradeTimestamp': undefined,\n 'status': status,\n 'symbol': market['symbol'],\n 'type': type,\n 'timeInForce': undefined,\n 'postOnly': undefined,\n 'side': side,\n 'price': price,\n 'triggerPrice': undefined,\n 'cost': undefined,\n 'average': average,\n 'amount': amount,\n 'filled': filled,\n 'remaining': remaining,\n 'trades': undefined,\n 'fee': undefined,\n 'info': order,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 719,
"line_start" => 710,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: Str)",
"source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'UNFILLED': 'open',\n 'PARTIALLY_FILLED': 'open',\n 'FULLY_FILLED': 'closed',\n 'CANCELED_UNFILLED': 'canceled',\n 'CANCELED_PARTIALLY_FILLED': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 396,
"line_start" => 370,
"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, 'vol')"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "ticker"
}
],
"name" => "parseTicker",
"signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker",
"source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n const symbol = this.safeSymbol (undefined, market);\n const timestamp = this.safeInteger (ticker, 'timestamp');\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, 'vol'),\n 'quoteVolume': undefined,\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"transaction_id\": \"1143247037\",\n \"side\": \"buy\",\n \"price\": \"3836025\",\n \"amount\": \"0.0005\",\n \"executed_at\": \"1694249441593\"\n }"
],
"line_end" => 484,
"line_start" => 440,
"mappings" => [
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "order",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "takerOrMaker"
},
%{
"comment" => nil,
"key" => "price",
"value" => "priceString"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // fetchTrades\n //\n // {\n // \"transaction_id\": \"1143247037\",\n // \"side\": \"buy\",\n // \"price\": \"3836025\",\n // \"amount\": \"0.0005\",\n // \"executed_at\": \"1694249441593\"\n // }\n //\n const timestamp = this.safeInteger (trade, 'executed_at');\n market = this.safeMarket (undefined, market);\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'amount');\n const id = this.safeString2 (trade, 'transaction_id', 'trade_id');\n const takerOrMaker = this.safeString (trade, 'maker_taker');\n let fee = undefined;\n const feeCostString = this.safeString (trade, 'fee_amount_quote');\n if (feeCostString !== undefined) {\n fee = {\n 'currency': market['quote'],\n 'cost': feeCostString,\n };\n }\n const orderId = this.safeString (trade, 'order_id');\n const type = this.safeString (trade, 'type');\n const side = this.safeString (trade, 'side');\n return this.safeTrade ({\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': market['symbol'],\n 'id': id,\n 'order': orderId,\n 'type': type,\n 'side': side,\n 'takerOrMaker': takerOrMaker,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'fee': fee,\n 'info': trade,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"uuid\": \"string\",\n \"asset\": \"btc\",\n \"amount\": 0,\n \"account_uuid\": \"string\",\n \"fee\": 0,\n \"status\": \"DONE\",\n \"label\": \"string\",\n \"txid\": \"string\",\n \"address\": \"string\",\n \"requested_at\": 0\n }"
],
"line_end" => 1054,
"line_start" => 1013,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "txid"
},
%{
"comment" => nil,
"key" => "txid",
"value" => "txid"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "network",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "addressFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "currency['code']"
},
%{
"comment" => nil,
"key" => "status",
"value" => "undefined"
},
%{
"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" => "undefined"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
},
%{
"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 // \"uuid\": \"string\",\n // \"asset\": \"btc\",\n // \"amount\": 0,\n // \"account_uuid\": \"string\",\n // \"fee\": 0,\n // \"status\": \"DONE\",\n // \"label\": \"string\",\n // \"txid\": \"string\",\n // \"address\": \"string\",\n // \"requested_at\": 0\n // }\n //\n const txid = this.safeString (transaction, 'txid');\n currency = this.safeCurrency (undefined, currency);\n return {\n 'id': txid,\n 'txid': txid,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'network': undefined,\n 'addressFrom': undefined,\n 'address': undefined,\n 'addressTo': undefined,\n 'amount': undefined,\n 'type': undefined,\n 'currency': currency['code'],\n 'status': undefined,\n 'updated': undefined,\n 'tagFrom': undefined,\n 'tag': undefined,\n 'tagTo': undefined,\n 'comment': undefined,\n 'internal': undefined,\n 'fee': undefined,\n 'info': transaction,\n } as Transaction;\n }"
}
],
path_prefix: "/v1/",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 100,
period: 1000,
requests: 10,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [
%{
auth: false,
cost: 1,
method: :get,
path: "/spot/pairs"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/spot/status"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/assets"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/deposit_history"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/deposit_originators"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/margin/positions"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/spot/active_orders"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/spot/order"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/spot/trade_history"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/unconfirmed_deposits"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/withdrawal_account"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/user/withdrawal_history"
},
%{
auth: false,
cost: 1.66,
method: :post,
path: "/user/confirm_deposits"
},
%{
auth: false,
cost: 1.66,
method: :post,
path: "/user/confirm_deposits_all"
},
%{
auth: false,
cost: 1.66,
method: :post,
path: "/user/request_withdrawal"
},
%{
auth: false,
cost: 1.66,
method: :post,
path: "/user/spot/cancel_order"
},
%{
auth: false,
cost: 1.66,
method: :post,
path: "/user/spot/cancel_orders"
},
%{
auth: false,
cost: 1.66,
method: :post,
path: "/user/spot/order"
},
%{
auth: false,
cost: 1.66,
method: :post,
path: "/user/spot/orders_info"
}
],
public: [
%{
auth: false,
cost: 1,
method: :get,
path: "/tickers"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/tickers_jpy"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/{pair}/candlestick/{candletype}/{yyyymmdd}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/{pair}/circuit_break_info"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/{pair}/depth"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/{pair}/ticker"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/{pair}/transactions"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/{pair}/transactions/{yyyymmdd}"
}
]
},
required_credentials: %{
api_key: true,
password: false,
secret: true,
uid: false
},
requires_eddsa: false,
response_error: %{
code_field: "error",
field: "success",
message_field: "message",
success_values: nil,
type: :success_bool
},
signing: %{
api_key_header: "ACCESS-KEY",
confidence: :medium,
passphrase_header: "ACCESS-PASSPHRASE",
pattern: :hmac_sha256_passphrase_signed,
signature_header: "ACCESS-SIGN",
timestamp_header: "ACCESS-TIMESTAMP"
},
spec_format_version: 2,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{
"max" => 1000,
"min" => 0.0001
},
"cost" => %{},
"price" => %{}
},
sample_precision: %{
"amount" => 0.0001,
"price" => 1
},
spot: %{
base: "BTC",
base_id: "btc",
case: :lower,
contract: false,
id: "btc_jpy",
limits: %{
"amount" => %{
"max" => 1000,
"min" => 0.0001
},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
maker: 0,
precision: %{
"amount" => 0.0001,
"price" => 1
},
quote: "JPY",
quote_id: "jpy",
separator: "_",
symbol: "BTC/JPY",
taker: 0.001
}
},
symbol_patterns: %{
spot: %{
case: :lower,
component_order: nil,
date_format: nil,
pattern: :underscore_lower,
prefix: nil,
separator: "_",
suffix: nil
}
},
timeframes: %{
"12h" => "12hour",
"15m" => "15min",
"1d" => "1day",
"1h" => "1hour",
"1m" => "1min",
"1w" => "1week",
"30m" => "30min",
"4h" => "4hour",
"5m" => "5min",
"8h" => "8hour"
},
url_strategy: %{
detected_from: "sign_method",
pattern: :version_slash,
prefix: "/v1/"
},
urls: %{
api: "https://public.bitbank.cc",
api_sections: %{
"markets" => "https://api.bitbank.cc",
"private" => "https://api.bitbank.cc",
"public" => "https://public.bitbank.cc"
},
doc: "https://docs.bitbank.cc/",
other: nil,
sandbox: nil,
www: "https://bitbank.cc/"
},
version: "v1",
ws: nil
}