Current section
Files
Jump to
Current section
Files
priv/specs/extracted/hibachi.exs
# Hibachi Exchange Specification
#
# Auto-generated by: mix ccxt.extract hibachi
# 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: [
"US"
],
currencies: %{
"USDT" => %{
"active" => true,
"code" => "USDT",
"deposit" => true,
"fees" => %{},
"id" => "USDT",
"info" => %{},
"limits" => %{
"deposit" => %{},
"withdraw" => %{}
},
"name" => "USDT",
"networks" => %{
"ARBITRUM" => %{
"id" => "ARBITRUM",
"info" => %{},
"limits" => %{
"deposit" => %{},
"withdraw" => %{}
},
"network" => "ARBITRUM"
}
},
"precision" => 1.0e-6,
"type" => "fiat",
"withdraw" => true
}
},
currency_aliases: %{
"BCHSV" => "BSV",
"XBT" => "BTC"
},
dex: true,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 21,
"coveragePercent" => 100,
"enabledMethods" => 30,
"excluded" => [
%{
"method" => "fetchTransactions",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 1,
"extractableMethods" => 29,
"failures" => [
%{
"error" => "Cannot read properties of undefined (reading 'length')",
"method" => "cancelAllOrders"
},
%{
"error" => "Cannot convert test-order-id to a BigInt",
"method" => "cancelOrder"
},
%{
"error" => "Cannot convert test-order-id to a BigInt",
"method" => "cancelOrders"
},
%{
"error" => "Cannot read properties of undefined (reading 'toString')",
"method" => "createLimitOrder"
},
%{
"error" => "Cannot read properties of undefined (reading 'toString')",
"method" => "createOrder"
},
%{
"error" => "Cannot read properties of undefined (reading 'toString')",
"method" => "createOrders"
},
%{
"error" => "Cannot convert nan to a BigInt",
"method" => "editOrder"
},
%{
"error" => "Cannot convert nan to a BigInt",
"method" => "editOrders"
}
]
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/trade/account/info",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_deposit_address,
param_mappings: %{},
params: [
:code
],
path: "/capital/deposit-info",
response_transformer: {:extract_path_unwrap, ["depositAddressEvm"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_deposits,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/capital/history",
response_transformer: {:extract_path, ["transactions"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_funding_rate,
param_mappings: %{},
params: [
:symbol
],
path: "/market/data/prices",
response_transformer: {:extract_path_unwrap, ["fundingRateEstimation", "estimatedFundingRate"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_funding_rate_history,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/market/data/funding-rates",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/market/data/orderbook",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_ledger,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/capital/history",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/market/exchange-info",
response_transformer: {:extract_path, ["futureContracts"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_my_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/trade/account/trades",
response_transformer: {:extract_path, ["trades"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_ohlcv,
param_mappings: %{
"since" => "fromMs",
"timeframe" => "interval"
},
params: [
:symbol,
:timeframe,
:since,
:limit
],
path: "/market/data/klines",
response_transformer: {:extract_path, ["klines"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_open_interest,
param_mappings: %{},
params: [
:symbol
],
path: "/market/data/open-interest",
response_transformer: {:extract_path_unwrap, ["totalQuantity"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_open_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/trade/orders",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_order,
param_mappings: %{
"id" => "orderId"
},
params: [
:id,
:symbol
],
path: "/trade/order",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/market/data/orderbook",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_positions,
param_mappings: %{},
params: [
:symbols
],
path: "/trade/account/info",
response_transformer: {:extract_path, ["positions"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_ticker,
param_mappings: %{},
params: [
:symbol
],
path: "/market/data/prices",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :fetch_time,
param_mappings: %{},
params: [],
path: "/exchange/utc-timestamp",
response_transformer: {:extract_path_unwrap, ["timestampMs"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/market/data/trades",
response_transformer: {:extract_path, ["trades"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_trading_fees,
param_mappings: %{},
params: [],
path: "/trade/account/info",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :swap,
method: :get,
name: :fetch_withdrawals,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/capital/history",
response_transformer: {:extract_path, ["transactions"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :swap,
method: :get,
name: :withdraw,
param_mappings: %{},
params: [
:code,
:amount,
:address,
:tag
],
path: "/market/exchange-info",
source: :intercepted
}
],
error_code_details: %{
2 => %{
description: "Invalid signature: Failed to verify signature",
type: :invalid_parameters
},
3 => %{
description: "Not found: order ID 33",
type: :order_not_found
},
4 => %{
description: "Missing accountId",
type: :invalid_parameters
}
},
error_codes: %{
2 => :invalid_parameters,
3 => :order_not_found,
4 => :invalid_parameters
},
exceptions: %{
exact: %{
"2" => :bad_request,
"3" => :order_not_found,
"4" => :bad_request
}
},
exchange_options: %{
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"networksById" => %{}
},
extended_metadata: %{
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://github.com/user-attachments/assets/7301bbb1-4f27-4167-8a55-75f74b14e973",
referral_url: "hibachi.xyz/r/ZBL2YFWIHU"
},
extracted_metadata: %{
ccxt_version: "4.5.42"
},
features: %{
default: %{
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: true
},
trailing: false,
trigger_price: true
},
fetch_my_trades: %{
margin_mode: false,
symbol_required: false
},
fetch_ohlcv: %{},
fetch_open_orders: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
sandbox: false
},
future: %{
linear: %{
extends: "default"
}
},
swap: %{
linear: %{
extends: "default"
}
}
},
fees: %{
trading: %{
maker: 1.5e-4,
percentage: true,
taker: 4.5e-4,
tier_based: false
}
},
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; // fallback to default error handler\n }\n if ('status' in response) {\n //\n // {\"errorCode\":4,\"message\":\"Invalid input: Invalid quantity: 0\",\"status\":\"failed\"}\n //\n const status = this.safeString(response, 'status');\n if (status === 'failed') {\n const code = this.safeString(response, 'errorCode');\n const feedback = this.id + ' ' + body;\n this.throwBroadlyMatchedException(this.exceptions['broad'], body, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], code, feedback);\n const message = this.safeString(response, 'message');\n this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);\n throw new errors.ExchangeError(feedback);\n }\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: true,
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,
cancel_withdraw: false,
close_all_positions: false,
close_position: false,
create_convert_trade: false,
create_deposit_address: false,
create_limit_buy_order: false,
create_limit_buy_order_ws: false,
create_limit_order: true,
create_limit_order_ws: false,
create_limit_sell_order: false,
create_limit_sell_order_ws: false,
create_market_buy_order: false,
create_market_buy_order_with_cost: false,
create_market_buy_order_with_cost_ws: false,
create_market_buy_order_ws: false,
create_market_order: false,
create_market_order_with_cost: false,
create_market_order_with_cost_ws: false,
create_market_order_ws: true,
create_market_sell_order: false,
create_market_sell_order_with_cost: false,
create_market_sell_order_with_cost_ws: false,
create_market_sell_order_ws: false,
create_order: true,
create_order_with_take_profit_and_stop_loss: false,
create_order_with_take_profit_and_stop_loss_ws: false,
create_order_ws: false,
create_orders: true,
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: true,
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: true,
fetch_deposits_withdrawals: false,
fetch_deposits_ws: false,
fetch_funding_history: false,
fetch_funding_interval: false,
fetch_funding_intervals: false,
fetch_funding_rate: true,
fetch_funding_rate_history: true,
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: true,
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: true,
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: true,
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: true,
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,
sandbox: false,
set_leverage: false,
set_margin: false,
set_margin_mode: false,
set_position_mode: false,
sign_in: false,
spot: false,
swap: true,
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: %{
user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
},
id: "hibachi",
markets: nil,
name: "Hibachi",
ohlcv_timestamp_resolution: :unknown,
options: %{},
order_mappings: nil,
param_mappings: %{
"id" => "orderId",
"since" => "fromMs",
"timeframe" => "interval"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 444,
"line_start" => 433,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const result: Dict = {\n 'info': response,\n };\n // Hibachi only supports USDT on Arbitrum at this time\n const code = this.safeCurrencyCode ('USDT');\n const account = this.account ();\n account['total'] = this.safeString (response, 'balance');\n account['free'] = this.safeString (response, 'maximalWithdraw');\n result[code] = account;\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1736,
"line_start" => 1681,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (item, 'id')"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "this.currency ('USDT')"
},
%{
"comment" => nil,
"key" => "account",
"value" => "this.numberToString (this.accountId)"
},
%{
"comment" => nil,
"key" => "referenceAccount",
"value" => "referenceAccount"
},
%{
"comment" => nil,
"key" => "referenceId",
"value" => "referenceId"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "before",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "after",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"comment" => nil,
"key" => "direction",
"value" => "direction"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "info",
"value" => "item"
}
],
"name" => "parseLedgerEntry",
"signature" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry",
"source" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry {\n const transactionType = this.safeString (item, 'transactionType');\n let timestamp = undefined;\n let type = undefined;\n let direction = undefined;\n let amount = undefined;\n let fee = undefined;\n let referenceId = undefined;\n let referenceAccount = undefined;\n let status = undefined;\n if (transactionType === undefined) {\n // response from TradeAccountTradingHistory\n timestamp = this.safeIntegerProduct (item, 'timestamp', 1000);\n type = 'trade';\n let amountStr = this.safeString (item, 'realizedPnl');\n if (Precise.stringLt (amountStr, '0')) {\n direction = 'out';\n amountStr = Precise.stringNeg (amountStr);\n } else {\n direction = 'in';\n }\n amount = this.parseNumber (amountStr);\n fee = { 'currency': 'USDT', 'cost': this.safeNumber (item, 'fee') };\n status = 'ok';\n } else {\n // response from CapitalHistory\n timestamp = this.safeIntegerProduct (item, 'timestampSec', 1000);\n amount = this.safeNumber (item, 'quantity');\n direction = (transactionType === 'deposit' || transactionType === 'transfer-in') ? 'in' : 'out';\n type = this.parseTransactionType (transactionType);\n status = this.parseTransactionStatus (this.safeString (item, 'status'));\n if (transactionType === 'transfer-in') {\n referenceAccount = this.safeString (item, 'srcAccountId');\n } else if (transactionType === 'transfer-out') {\n referenceAccount = this.safeString (item, 'receivingAccountId');\n }\n referenceId = this.safeString (item, 'transactionHash');\n }\n return this.safeLedgerEntry ({\n 'id': this.safeString (item, 'id'),\n 'currency': this.currency ('USDT'),\n 'account': this.numberToString (this.accountId),\n 'referenceAccount': referenceAccount,\n 'referenceId': referenceId,\n 'status': status,\n 'amount': amount,\n 'before': undefined,\n 'after': undefined,\n 'fee': fee,\n 'direction': direction,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'type': type,\n 'info': item,\n }, currency) as LedgerEntry;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 341,
"line_start" => 279,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "marketId"
},
%{
"comment" => nil,
"key" => "numericId",
"value" => "numericId"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "base",
"value" => "base"
},
%{
"comment" => nil,
"key" => "quote",
"value" => "quote"
},
%{
"comment" => nil,
"key" => "settle",
"value" => "settle"
},
%{
"comment" => nil,
"key" => "baseId",
"value" => "baseId"
},
%{
"comment" => nil,
"key" => "quoteId",
"value" => "quoteId"
},
%{
"comment" => nil,
"key" => "settleId",
"value" => "settleId"
},
%{
"comment" => nil,
"key" => "type",
"value" => "marketType"
},
%{
"comment" => nil,
"key" => "spot",
"value" => "false"
},
%{
"comment" => nil,
"key" => "margin",
"value" => "false"
},
%{
"comment" => nil,
"key" => "swap",
"value" => "true"
},
%{
"comment" => nil,
"key" => "future",
"value" => "false"
},
%{
"comment" => nil,
"key" => "option",
"value" => "false"
},
%{
"comment" => nil,
"key" => "active",
"value" => "this.safeString (market, 'status') === 'LIVE'"
},
%{
"comment" => nil,
"key" => "contract",
"value" => "true"
},
%{
"comment" => nil,
"key" => "linear",
"value" => "true"
},
%{
"comment" => nil,
"key" => "inverse",
"value" => "false"
},
%{
"comment" => nil,
"key" => "contractSize",
"value" => "this.parseNumber ('1')"
},
%{
"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, 'underlyingDecimals'))),\n 'price': this.parseNumber (this.safeList (market, 'orderbookGranularities')[0]) / 10000.0,\n }"
},
%{
"comment" => nil,
"key" => "limits",
"value" => "{\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': undefined,\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': this.safeNumber (market, 'minNotional'),\n 'max': undefined,\n },\n }"
},
%{
"comment" => nil,
"key" => "created",
"value" => "created"
},
%{
"comment" => nil,
"key" => "info",
"value" => "market"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.parseNumber (this.parsePrecision (this.safeString (market, 'underlyingDecimals')))"
},
%{
"comment" => nil,
"key" => "price",
"value" => "this.parseNumber (this.safeList (market, 'orderbookGranularities')[0]) / 10000.0"
},
%{
"comment" => nil,
"key" => "leverage",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "price",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "{\n 'min': this.safeNumber (market, 'minNotional'),\n 'max': undefined,\n }"
}
],
"name" => "parseMarket",
"signature" => "parseMarket (market: Dict): Market",
"source" => "parseMarket (market: Dict): Market {\n const marketId = this.safeString (market, 'symbol');\n const numericId = this.safeNumber (market, 'id');\n const marketType = 'swap';\n const baseId = this.safeString (market, 'underlyingSymbol');\n const quoteId = this.safeString (market, 'settlementSymbol');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n const settleId: Str = this.safeString (market, 'settlementSymbol');\n const settle: Str = this.safeCurrencyCode (settleId);\n const symbol = base + '/' + quote + ':' + settle;\n const created = this.safeIntegerProduct (market, 'marketCreationTimestamp', 1000);\n return {\n 'id': marketId,\n 'numericId': numericId,\n 'symbol': symbol,\n 'base': base,\n 'quote': quote,\n 'settle': settle,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': settleId,\n 'type': marketType,\n 'spot': false,\n 'margin': false,\n 'swap': true,\n 'future': false,\n 'option': false,\n 'active': this.safeString (market, 'status') === 'LIVE',\n 'contract': true,\n 'linear': true,\n 'inverse': false,\n 'contractSize': this.parseNumber ('1'),\n 'expiry': undefined,\n 'expiryDatetime': undefined,\n 'strike': undefined,\n 'optionType': undefined,\n 'precision': {\n 'amount': this.parseNumber (this.parsePrecision (this.safeString (market, 'underlyingDecimals'))),\n 'price': this.parseNumber (this.safeList (market, 'orderbookGranularities')[0]) / 10000.0,\n },\n 'limits': {\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': undefined,\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': this.safeNumber (market, 'minNotional'),\n 'max': undefined,\n },\n },\n 'created': created,\n 'info': market,\n };\n }"
},
%{
"comment" => nil,
"examples" => [
"[\n {\n \"close\": \"3704.751036\",\n \"high\": \"3716.530378\",\n \"interval\": \"1h\",\n \"low\": \"3699.627883\",\n \"open\": \"3716.406894\",\n \"timestamp\": 1712628000,\n \"volumeNotional\": \"1637355.846362\"\n }\n ]"
],
"line_end" => 1408,
"line_start" => 1386,
"mappings" => [],
"name" => "parseOHLCV",
"signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV",
"source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // [\n // {\n // \"close\": \"3704.751036\",\n // \"high\": \"3716.530378\",\n // \"interval\": \"1h\",\n // \"low\": \"3699.627883\",\n // \"open\": \"3716.406894\",\n // \"timestamp\": 1712628000,\n // \"volumeNotional\": \"1637355.846362\"\n // }\n // ]\n //\n return [\n this.safeIntegerProduct (ohlcv, 'timestamp', 1000),\n this.safeNumber (ohlcv, 'open'),\n this.safeNumber (ohlcv, 'high'),\n this.safeNumber (ohlcv, 'low'),\n this.safeNumber (ohlcv, 'close'),\n this.safeNumber (ohlcv, 'volumeNotional'),\n ];\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 734,
"line_start" => 676,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (order, 'orderId')"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "lastTradeTimestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "lastUpdateTimestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseOrderStatus (status)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "timeInForce"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "filled"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remaining"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "reduceOnly",
"value" => "reduceOnly"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "postOnly"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "this.safeNumber (order, 'triggerPrice')"
}
],
"name" => "parseOrder",
"signature" => "parseOrder (order: Dict, market: Market = undefined): Order",
"source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n const marketId = this.safeString (order, 'symbol');\n market = this.safeMarket (marketId, market);\n const status = this.safeString (order, 'status');\n const type = this.safeStringLower (order, 'orderType');\n const price = this.safeString (order, 'price');\n const rawSide = this.safeString (order, 'side');\n let side = undefined;\n if (rawSide === 'BID') {\n side = 'buy';\n } else if (rawSide === 'ASK') {\n side = 'sell';\n }\n const amount = this.safeString (order, 'totalQuantity');\n const remaining = this.safeString (order, 'availableQuantity');\n const totalQuantity = this.safeString (order, 'totalQuantity');\n const availableQuantity = this.safeString (order, 'availableQuantity');\n let filled = undefined;\n if (totalQuantity !== undefined && availableQuantity !== undefined) {\n filled = Precise.stringSub (totalQuantity, availableQuantity);\n }\n let timeInForce = 'GTC';\n const orderFlags = this.safeValue (order, 'orderFlags');\n let postOnly = false;\n let reduceOnly = false;\n if (orderFlags === 'POST_ONLY') {\n timeInForce = 'PO';\n postOnly = true;\n } else if (orderFlags === 'IOC') {\n timeInForce = 'IOC';\n } else if (orderFlags === 'REDUCE_ONLY') {\n reduceOnly = true;\n }\n return this.safeOrder ({\n 'info': order,\n 'id': this.safeString (order, 'orderId'),\n 'clientOrderId': undefined,\n 'datetime': undefined,\n 'timestamp': undefined,\n 'lastTradeTimestamp': undefined,\n 'lastUpdateTimestamp': undefined,\n 'status': this.parseOrderStatus (status),\n 'symbol': market['symbol'],\n 'type': type,\n 'timeInForce': timeInForce,\n 'side': side,\n 'price': price,\n 'average': undefined,\n 'amount': amount,\n 'filled': filled,\n 'remaining': remaining,\n 'cost': undefined,\n 'trades': undefined,\n 'fee': undefined,\n 'reduceOnly': reduceOnly,\n 'postOnly': postOnly,\n 'triggerPrice': this.safeNumber (order, 'triggerPrice'),\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 674,
"line_start" => 662,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: string): string",
"source" => "parseOrderStatus (status: string): string {\n const statuses: Dict = {\n 'PENDING': 'open',\n 'CHILD_PENDING': 'open',\n 'SCHEDULED_TWAP': 'open',\n 'PLACED': 'open',\n 'PARTIALLY_FILLED': 'open',\n 'FILLED': 'closed',\n 'CANCELLED': 'canceled',\n 'REJECTED': 'rejected',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"direction\": \"Short\",\n \"entryNotional\": \"10.302213\",\n \"notionalValue\": \"10.225008\",\n \"quantity\": \"0.004310550\",\n \"symbol\": \"ETH/USDT-P\",\n \"unrealizedFundingPnl\": \"0.000000\",\n \"unrealizedTradingPnl\": \"0.077204\"\n }"
],
"line_end" => 1615,
"line_start" => 1570,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "position"
},
%{
"comment" => nil,
"key" => "id",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "entryPrice",
"value" => "this.safeString (position, 'average_entry_price')"
},
%{
"comment" => nil,
"key" => "markPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "notional",
"value" => "this.safeString (position, 'notionalValue')"
},
%{
"comment" => nil,
"key" => "collateral",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "unrealizedPnl",
"value" => "unrealizedPnl"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "contracts",
"value" => "this.parseNumber (quantity)"
},
%{
"comment" => nil,
"key" => "contractSize",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "hedged",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "maintenanceMargin",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "maintenanceMarginPercentage",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "initialMargin",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "initialMarginPercentage",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "leverage",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "liquidationPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "marginRatio",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "marginMode",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "undefined"
}
],
"name" => "parsePosition",
"signature" => "parsePosition (position: Dict, market: Market = undefined)",
"source" => "parsePosition (position: Dict, market: Market = undefined) {\n //\n // {\n // \"direction\": \"Short\",\n // \"entryNotional\": \"10.302213\",\n // \"notionalValue\": \"10.225008\",\n // \"quantity\": \"0.004310550\",\n // \"symbol\": \"ETH/USDT-P\",\n // \"unrealizedFundingPnl\": \"0.000000\",\n // \"unrealizedTradingPnl\": \"0.077204\"\n // }\n //\n const marketId = this.safeString (position, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n const side = this.safeStringLower (position, 'direction');\n const quantity = this.safeString (position, 'quantity');\n const unrealizedFunding = this.safeString (position, 'unrealizedFundingPnl', '0');\n const unrealizedTrading = this.safeString (position, 'unrealizedTradingPnl', '0');\n const unrealizedPnl = Precise.stringAdd (unrealizedFunding, unrealizedTrading);\n return this.safePosition ({\n 'info': position,\n 'id': undefined,\n 'symbol': symbol,\n 'entryPrice': this.safeString (position, 'average_entry_price'),\n 'markPrice': undefined,\n 'notional': this.safeString (position, 'notionalValue'),\n 'collateral': undefined,\n 'unrealizedPnl': unrealizedPnl,\n 'side': side,\n 'contracts': this.parseNumber (quantity),\n 'contractSize': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'hedged': undefined,\n 'maintenanceMargin': undefined,\n 'maintenanceMarginPercentage': undefined,\n 'initialMargin': undefined,\n 'initialMarginPercentage': undefined,\n 'leverage': undefined,\n 'liquidationPrice': undefined,\n 'marginRatio': undefined,\n 'marginMode': undefined,\n 'percentage': undefined,\n });\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 509,
"line_start" => 478,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "this.safeSymbol (undefined, market)"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "bid"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "ask"
},
%{
"comment" => nil,
"key" => "last",
"value" => "last"
},
%{
"comment" => nil,
"key" => "high",
"value" => "high"
},
%{
"comment" => nil,
"key" => "low",
"value" => "low"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"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" => "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" => "undefined"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "volume"
},
%{
"comment" => nil,
"key" => "info",
"value" => "ticker"
}
],
"name" => "parseTicker",
"signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker",
"source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n const prices = this.safeDict (ticker, 'prices');\n const stats = this.safeDict (ticker, 'stats');\n const bid = this.safeNumber (prices, 'bidPrice');\n const ask = this.safeNumber (prices, 'askPrice');\n const last = this.safeNumber (prices, 'tradePrice');\n const high = this.safeNumber (stats, 'high24h');\n const low = this.safeNumber (stats, 'low24h');\n const volume = this.safeNumber (stats, 'volume24h');\n return this.safeTicker ({\n 'symbol': this.safeSymbol (undefined, market),\n 'timestamp': undefined,\n 'datetime': undefined,\n 'bid': bid,\n 'ask': ask,\n 'last': last,\n 'high': high,\n 'low': low,\n 'bidVolume': undefined,\n 'askVolume': undefined,\n 'vwap': undefined,\n 'open': undefined,\n 'close': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': undefined,\n 'quoteVolume': volume,\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"price\": \"3512.431902\",\n \"quantity\": \"1.414780098\",\n \"takerSide\": \"Buy\",\n \"timestamp\": 1712692147\n }",
"{\n \"askAccountId\": 221,\n \"askOrderId\": 589168494921909200,\n \"bidAccountId\": 132,\n \"bidOrderId\": 589168494829895700,\n \"fee\": \"0.000477\",\n \"id\": 199511136,\n \"orderType\": \"MARKET\",\n \"price\": \"119257.90000\",\n \"quantity\": \"0.0000200000\",\n \"realizedPnl\": \"-0.000352\",\n \"side\": \"Sell\",\n \"symbol\": \"BTC/USDT-P\",\n \"timestamp\": 1752543391\n }"
],
"line_end" => 579,
"line_start" => 511,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "cost"
},
%{
"comment" => nil,
"key" => "order",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "takerOrMaker"
},
%{
"comment" => nil,
"key" => "type",
"value" => "orderType"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "this.safeString (trade, 'fee')"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "'USDT'"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n // public fetchTrades:\n // {\n // \"price\": \"3512.431902\",\n // \"quantity\": \"1.414780098\",\n // \"takerSide\": \"Buy\",\n // \"timestamp\": 1712692147\n // }\n //\n // private fetchMyTrades:\n // {\n // \"askAccountId\": 221,\n // \"askOrderId\": 589168494921909200,\n // \"bidAccountId\": 132,\n // \"bidOrderId\": 589168494829895700,\n // \"fee\": \"0.000477\",\n // \"id\": 199511136,\n // \"orderType\": \"MARKET\",\n // \"price\": \"119257.90000\",\n // \"quantity\": \"0.0000200000\",\n // \"realizedPnl\": \"-0.000352\",\n // \"side\": \"Sell\",\n // \"symbol\": \"BTC/USDT-P\",\n // \"timestamp\": 1752543391\n // }\n const marketId = this.safeString (trade, 'symbol');\n market = this.safeMarket (marketId, market);\n const symbol = market['symbol'];\n const id = this.safeString (trade, 'id');\n const price = this.safeString (trade, 'price');\n const amount = this.safeString (trade, 'quantity');\n const timestamp = this.safeIntegerProduct (trade, 'timestamp', 1000);\n const cost = Precise.stringMul (price, amount);\n let side = undefined;\n let fee = undefined;\n let orderType = undefined;\n let orderId = undefined;\n let takerOrMaker = undefined;\n if (id === undefined) {\n // public trades\n side = this.safeStringLower (trade, 'takerSide');\n takerOrMaker = 'taker';\n } else {\n // private trades\n side = this.safeStringLower (trade, 'side');\n fee = { 'cost': this.safeString (trade, 'fee'), 'currency': 'USDT' };\n orderType = this.safeStringLower (trade, 'orderType');\n if (side === 'buy') {\n orderId = this.safeString (trade, 'bidOrderId');\n } else {\n orderId = this.safeString (trade, 'askOrderId');\n }\n }\n return this.safeTrade ({\n 'id': id,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': symbol,\n 'side': side,\n 'price': price,\n 'amount': amount,\n 'cost': cost,\n 'order': orderId,\n 'takerOrMaker': takerOrMaker,\n 'type': orderType,\n 'fee': fee,\n 'info': trade,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1901,
"line_start" => 1872,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "transaction"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (transaction, 'id')"
},
%{
"comment" => nil,
"key" => "txid",
"value" => "this.safeString (transaction, 'transactionHash')"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "network",
"value" => "'ARBITRUM'"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "address"
},
%{
"comment" => nil,
"key" => "addressFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "transactionType"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.safeNumber (transaction, 'quantity')"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "'USDT'"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseTransactionStatus (this.safeString (transaction, 'status'))"
},
%{
"comment" => nil,
"key" => "updated",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "comment",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
}
],
"name" => "parseTransaction",
"signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction",
"source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n const timestamp = this.safeIntegerProduct (transaction, 'timestampSec', 1000);\n const address = this.safeString (transaction, 'withdrawalAddress');\n let transactionType = this.safeString (transaction, 'transactionType');\n if (transactionType !== 'deposit' && transactionType !== 'withdrawal') {\n transactionType = this.parseTransactionType (transactionType);\n }\n return {\n 'info': transaction,\n 'id': this.safeString (transaction, 'id'),\n 'txid': this.safeString (transaction, 'transactionHash'),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': 'ARBITRUM', // Currently the exchange only exists on Arbitrum,\n 'address': address,\n 'addressTo': address,\n 'addressFrom': undefined,\n 'tag': undefined,\n 'tagTo': undefined,\n 'tagFrom': undefined,\n 'type': transactionType,\n 'amount': this.safeNumber (transaction, 'quantity'),\n 'currency': 'USDT',\n 'status': this.parseTransactionStatus (this.safeString (transaction, 'status')),\n 'updated': undefined,\n 'internal': undefined,\n 'comment': undefined,\n 'fee': undefined,\n };\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1679,
"line_start" => 1671,
"mappings" => [],
"name" => "parseTransactionStatus",
"signature" => "parseTransactionStatus (status)",
"source" => "parseTransactionStatus (status) {\n const statuses: Dict = {\n 'pending': 'pending',\n 'claimable': 'pending',\n 'completed': 'ok',\n 'failed': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1669,
"line_start" => 1661,
"mappings" => [],
"name" => "parseTransactionType",
"signature" => "parseTransactionType (type)",
"source" => "parseTransactionType (type) {\n const types: Dict = {\n 'deposit': 'transaction',\n 'withdrawal': 'transaction',\n 'transfer-in': 'transfer',\n 'transfer-out': 'transfer',\n };\n return this.safeString (types, type, type);\n }"
}
],
path_prefix: "",
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: "/capital/deposit-info"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/capital/history"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/trade/account/info"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/trade/account/trades"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/trade/account/trading_history"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/trade/order"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/trade/orders"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/capital/withdraw"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/trade/order"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/trade/orders"
},
%{
auth: false,
cost: 1,
method: :put,
path: "/trade/order"
},
%{
auth: false,
cost: 1,
method: :delete,
path: "/trade/order"
},
%{
auth: false,
cost: 1,
method: :delete,
path: "/trade/orders"
}
],
public: [
%{
auth: false,
cost: 1,
method: :get,
path: "/exchange/utc-timestamp"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/market/data/funding-rates"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/market/data/klines"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/market/data/open-interest"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/market/data/orderbook"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/market/data/prices"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/market/data/stats"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/market/data/trades"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/market/exchange-info"
}
]
},
required_credentials: %{
api_key: true,
password: false,
secret: false,
uid: false
},
requires_eddsa: false,
response_error: nil,
signing: %{
confidence: :medium,
pattern: :hmac_sha256_headers
},
spec_format_version: 2,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{},
"cost" => %{
"min" => 1
},
"price" => %{}
},
sample_precision: %{
"amount" => 1.0e-9,
"price" => 1.0e-6
},
swap: %{
base: "ETH",
base_id: "ETH",
case: :upper,
contract: true,
contract_size: 1,
id: "ETH/USDT-P",
inverse: false,
limits: %{
"amount" => %{},
"cost" => %{
"min" => 1
},
"leverage" => %{},
"price" => %{}
},
linear: true,
maker: 1.5e-4,
precision: %{
"amount" => 1.0e-9,
"price" => 1.0e-6
},
quote: "USDT",
quote_id: "USDT",
separator: "-",
settle: "USDT",
settle_id: "USDT",
symbol: "ETH/USDT:USDT",
taker: 4.5e-4
}
},
symbol_patterns: %{
swap: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :implicit,
prefix: nil,
separator: "-",
suffix: nil
}
},
timeframes: %{
"15m" => "15min",
"1d" => "1d",
"1h" => "1h",
"1m" => "1min",
"1w" => "1w",
"4h" => "4h",
"5m" => "5min"
},
url_strategy: %{
detected_from: "fallback",
pattern: :no_prefix,
prefix: nil
},
urls: %{
api: "https://data-api.hibachi.xyz",
api_sections: %{
"private" => "https://api.hibachi.xyz",
"public" => "https://data-api.hibachi.xyz"
},
doc: nil,
other: nil,
sandbox: nil,
www: "https://www.hibachi.xyz/"
},
version: nil,
ws: nil
}