Current section
Files
Jump to
Current section
Files
priv/specs/extracted/bigone.exs
# BigONE Exchange Specification
#
# Auto-generated by: mix ccxt.extract bigone
# 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: [
"CN"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"CRE" => "Cybereits",
"FREE" => "FreeRossDAO",
"FXT" => "FXTTOKEN",
"MBN" => "Mobilian Coin",
"ONE" => "BigONE Token",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 28,
"coveragePercent" => 100,
"enabledMethods" => 31,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 1,
"extractableMethods" => 30,
"failures" => [
%{
"error" => "bigone createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument",
"method" => "createMarketOrder"
},
%{
"error" => "bigone createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument",
"method" => "createStopMarketOrder"
}
]
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :spot,
method: :post,
name: :cancel_all_orders,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol
],
path: "/orders/cancel",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :spot,
method: :post,
name: :cancel_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/orders/{id}/cancel",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"side" => "BID",
"type" => "LIMIT"
},
expects: :single,
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/orders",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"side" => "BID",
"type" => "MARKET"
},
expects: :single,
market_type: :spot,
method: :post,
name: :create_market_buy_order_with_cost,
param_mappings: %{
"cost" => "amount",
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:cost
],
path: "/orders",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"side" => "BID"
},
expects: :single,
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/orders",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"post_only" => true,
"side" => "BID"
},
expects: :single,
market_type: :spot,
method: :post,
name: :create_post_only_order,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/orders",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"asset_pair_name" => "BTCUSDT",
"operator" => "GTE",
"side" => "BID",
"triggerDirection" => "below",
"type" => "STOP_LIMIT"
},
expects: :single,
market_type: :swap,
method: :post,
name: :create_stop_limit_order,
param_mappings: %{
"triggerPrice" => "stop_price"
},
params: [
:symbol,
:side,
:amount,
:price,
:triggerPrice
],
path: "/orders",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"asset_pair_name" => "BTCUSDT",
"operator" => "GTE",
"side" => "BID",
"triggerDirection" => "below",
"type" => "STOP_LIMIT"
},
expects: :single,
market_type: :swap,
method: :post,
name: :create_stop_order,
param_mappings: %{
"triggerPrice" => "stop_price"
},
params: [
:symbol,
:type,
:side,
:amount,
:price,
:triggerPrice
],
path: "/orders",
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: "/accounts",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"state" => "FILLED"
},
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_closed_orders,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:since,
:limit
],
path: "/orders",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "webExchange",
auth: false,
base_url: "https://{hostname}/api/",
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_currencies,
param_mappings: %{},
params: [],
path: "/v3/assets",
response_transformer: {:extract_path, ["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_symbol"
},
params: [
:code
],
path: "/assets/{asset_symbol}/address",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_deposits,
param_mappings: %{
"code" => "asset_symbol"
},
params: [
:code,
:since,
:limit
],
path: "/deposits",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:limit
],
path: "/asset_pairs/{asset_pair_name}/depth",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/asset_pairs",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_my_trades,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:since,
:limit
],
path: "/trades",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"limit" => 500,
"period" => "hour1",
"time" => "<generated>"
},
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_ohlcv,
param_mappings: %{
"symbol" => "asset_pair_name",
"timeframe" => "period"
},
params: [
:symbol,
:timeframe,
:since,
:limit
],
path: "/asset_pairs/{asset_pair_name}/candles",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"state" => "PENDING"
},
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_open_orders,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:since,
:limit
],
path: "/orders",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/orders/{id}",
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" => "asset_pair_name"
},
params: [
:symbol,
:limit
],
path: "/asset_pairs/{asset_pair_name}/depth",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_orders,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:since,
:limit
],
path: "/orders",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol
],
path: "/asset_pairs/{asset_pair_name}/ticker",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
_by_market_type: %{
spot: %{
"pair_names" => "BTCUSDT"
},
swap: %{}
}
},
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_tickers,
param_mappings: %{},
params: [
:symbols
],
path: "/asset_pairs/tickers",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :single,
market_type: :spot,
method: :get,
name: :fetch_time,
param_mappings: %{},
params: [],
path: "/ping",
response_transformer: {:extract_path_unwrap, ["data", "Timestamp"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"symbol" => "asset_pair_name"
},
params: [
:symbol,
:since,
:limit
],
path: "/asset_pairs/{asset_pair_name}/trades",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :list,
market_type: :spot,
method: :get,
name: :fetch_withdrawals,
param_mappings: %{
"code" => "asset_symbol"
},
params: [
:code,
:since,
:limit
],
path: "/withdrawals",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"guid" => "<generated>"
},
expects: :single,
market_type: :spot,
method: :post,
name: :transfer,
param_mappings: %{
"code" => "symbol",
"fromAccount" => "from",
"toAccount" => "to"
},
params: [
:code,
:amount,
:fromAccount,
:toAccount
],
path: "/transfer",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
expects: :single,
market_type: :spot,
method: :post,
name: :withdraw,
param_mappings: %{
"address" => "target_address",
"code" => "symbol"
},
params: [
:code,
:amount,
:address,
:tag
],
path: "/withdrawals",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
}
],
error_code_details: %{
10001 => %{
description: "syntax error",
type: :invalid_parameters
},
10005 => %{
description: "internal error",
type: :exchange_error
},
10007 => %{
description: "parameter error, {\"code\":10007,\"message\":\"Amount's scale must greater than AssetPair's base scale\"}",
type: :invalid_parameters
},
10011 => %{
description: "system error",
type: :exchange_error
},
10013 => %{
description: "Resource not found",
type: :invalid_order
},
10014 => %{
description: "Insufficient funds",
type: :insufficient_balance
},
10403 => %{
description: "permission denied",
type: :access_restricted
},
10429 => %{
description: "too many requests",
type: :rate_limited
},
40004 => %{
description: "invalid jwt",
type: :invalid_credentials
},
40103 => %{
description: "invalid otp code",
type: :invalid_credentials
},
40104 => %{
description: "invalid asset pin code",
type: :invalid_credentials
},
40120 => %{
description: "Order is in trading",
type: :invalid_order
},
40121 => %{
description: "Order is already cancelled or filled",
type: :invalid_order
},
40301 => %{
description: "Permission denied withdrawal create",
type: :access_restricted
},
40302 => %{
description: "already requested",
type: :exchange_error
},
40601 => %{
description: "resource is locked",
type: :exchange_error
},
40602 => %{
description: "resource is depleted",
type: :exchange_error
},
40603 => %{
description: "insufficient resource",
type: :insufficient_balance
},
40604 => %{
description: "Price exceed the maximum order price",
type: :invalid_order
},
40605 => %{
description: "Price less than the minimum order price",
type: :invalid_order
},
60100 => %{
description: "Asset pair is suspended",
type: :invalid_order
},
"Amount's scale must greater than AssetPair's base scale" => %{
description: nil,
type: :invalid_order
},
"Price mulit with amount should larger than AssetPair's min_quote_value" => %{
description: nil,
type: :invalid_order
}
},
error_codes: %{
10001 => :invalid_parameters,
10005 => :exchange_error,
10007 => :invalid_parameters,
10011 => :exchange_error,
10013 => :invalid_order,
10014 => :insufficient_balance,
10403 => :access_restricted,
10429 => :rate_limited,
40004 => :invalid_credentials,
40103 => :invalid_credentials,
40104 => :invalid_credentials,
40120 => :invalid_order,
40121 => :invalid_order,
40301 => :access_restricted,
40302 => :exchange_error,
40601 => :exchange_error,
40602 => :exchange_error,
40603 => :insufficient_balance,
40604 => :invalid_order,
40605 => :invalid_order,
60100 => :invalid_order,
"Amount's scale must greater than AssetPair's base scale" => :invalid_order,
"Price mulit with amount should larger than AssetPair's min_quote_value" => :invalid_order
},
exceptions: %{
exact: %{
"10001" => :bad_request,
"10005" => :exchange_error,
"10007" => :bad_request,
"10011" => :exchange_error,
"10013" => :bad_symbol,
"10014" => :insufficient_funds,
"10403" => :permission_denied,
"10429" => :rate_limit_exceeded,
"40004" => :authentication_error,
"40103" => :authentication_error,
"40104" => :authentication_error,
"40120" => :invalid_order,
"40121" => :invalid_order,
"40301" => :permission_denied,
"40302" => :exchange_error,
"40601" => :exchange_error,
"40602" => :exchange_error,
"40603" => :insufficient_funds,
"40604" => :invalid_order,
"40605" => :invalid_order,
"60100" => :bad_symbol,
"Amount's scale must greater than AssetPair's base scale" => :invalid_order,
"Price mulit with amount should larger than AssetPair's min_quote_value" => :invalid_order
}
},
exchange_options: %{
"accountsByType" => %{
"fund" => "FUND",
"funding" => "FUND",
"future" => "CONTRACT",
"spot" => "SPOT",
"swap" => "CONTRACT"
},
"createMarketBuyOrderRequiresPrice" => true,
"defaultNetwork" => "ERC20",
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"defaultNetworks" => %{
"USDT" => "TRC20"
},
"exchangeMillisecondsCorrection" => -100,
"fetchCurrencies" => %{
"webApiEnable" => true,
"webApiMuteFailure" => true,
"webApiRetries" => 5
},
"networks" => %{
"ABBC" => "ABBC",
"ACA" => "Acala",
"AE" => "Aeternity",
"ALGO" => "Algorand",
"APT" => "Aptos",
"AR" => "Arweave",
"ASTR" => "Astar",
"ATOM" => "Cosmos",
"AVAXC" => "Avax",
"AVAXX" => "AvaxChain",
"BCH" => "BitcoinCash",
"BEAM" => "Beam",
"BEP20" => "BinanceSmartChain",
"BITCI" => "BitciChain",
"BSV" => "BitcoinSV",
"BTC" => "Bitcoin",
"CELO" => "Celo",
"CKKB" => "CKB",
"CRC20" => "CRO",
"DASH" => "Dash",
"DOGE" => "Dogecoin",
"DOT" => "Polkadot",
"EOS" => "EOS",
"ETC" => "EthereumClassic",
"ETH" => "Ethereum",
"ETHW" => "EthereumPow",
"FIL" => "Filecoin",
"FSN" => "Fusion",
"FTM" => "Fantom",
"GLMR" => "Moonbeam",
"GRIN" => "Grin",
"HBAR" => "Hedera",
"HNT" => "Helium",
"HRC20" => "Hecochain",
"IOST" => "IOST",
"IRIS" => "IRIS",
"KLAY" => "Klaytn",
"KSM" => "Kusama",
"LTC" => "Litecoin",
"MATIC" => "Polygon",
"NEAR" => "Near",
"NEO" => "Neo",
"NEON3" => "NeoN3",
"OASIS" => "Oasis",
"OKC" => "Okexchain",
"ONE" => "Harmony",
"ONT" => "Ontology",
"OPTIMISM" => "Optimism",
"QTUM" => "Qtum",
"REI" => "REI",
"SDN" => "Shiden",
"SGB" => "SGB",
"SOL" => "Solana",
"TERA" => "Tera",
"TRC20" => "Tron",
"VET" => "Vechain",
"VSYS" => "VSystems",
"WAX" => "WAX",
"XEC" => "ECash",
"XLM" => "Stellar",
"XMR" => "Monero",
"XRP" => "Ripple",
"XTZ" => "Tezos",
"ZEC" => "Zcash",
"ZEN" => "Horizen"
},
"networksById" => %{
"ABBC" => "ABBC",
"Acala" => "ACA",
"Aeternity" => "AE",
"Algorand" => "ALGO",
"Aptos" => "APT",
"Arweave" => "AR",
"Astar" => "ASTR",
"Avax" => "AVAXC",
"AvaxChain" => "AVAXX",
"Beam" => "BEAM",
"BinanceSmartChain" => "BEP20",
"BitciChain" => "BITCI",
"Bitcoin" => "BTC",
"BitcoinCash" => "BCH",
"BitcoinSV" => "BSV",
"CKB" => "CKKB",
"CRO" => "CRC20",
"Celo" => "CELO",
"Cosmos" => "ATOM",
"Dash" => "DASH",
"Dogecoin" => "DOGE",
"ECash" => "XEC",
"EOS" => "EOS",
"Ethereum" => "ETH",
"EthereumClassic" => "ETC",
"EthereumPow" => "ETHW",
"Fantom" => "FTM",
"Filecoin" => "FIL",
"Fusion" => "FSN",
"Grin" => "GRIN",
"Harmony" => "ONE",
"Hecochain" => "HRC20",
"Hedera" => "HBAR",
"Helium" => "HNT",
"Horizen" => "ZEN",
"IOST" => "IOST",
"IRIS" => "IRIS",
"Klaytn" => "KLAY",
"Kusama" => "KSM",
"Litecoin" => "LTC",
"Monero" => "XMR",
"Moonbeam" => "GLMR",
"Near" => "NEAR",
"Neo" => "NEO",
"NeoN3" => "NEON3",
"Oasis" => "OASIS",
"Okexchain" => "OKC",
"Ontology" => "ONT",
"Optimism" => "OPTIMISM",
"Polkadot" => "DOT",
"Polygon" => "MATIC",
"Qtum" => "QTUM",
"REI" => "REI",
"Ripple" => "XRP",
"SGB" => "SGB",
"Shiden" => "SDN",
"Solana" => "SOL",
"Stellar" => "XLM",
"Tera" => "TERA",
"Tezos" => "XTZ",
"Tron" => "TRC20",
"VSystems" => "VSYS",
"Vechain" => "VET",
"WAX" => "WAX",
"Zcash" => "ZEC"
},
"transfer" => %{
"fillResponseFromRequest" => true
}
},
extended_metadata: %{
fees_url: "https://bigone.zendesk.com/hc/en-us/articles/115001933374-BigONE-Fee-Policy",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://github.com/user-attachments/assets/4e5cfd53-98cc-4b90-92cd-0d7b512653d1",
referral_url: "https://b1.run/users/new?code=D3LLBVFT"
},
extracted_metadata: %{
ccxt_version: "4.5.42"
},
features: %{
default: %{
create_order: %{
hedged: false,
iceberg: false,
leverage: false,
margin_mode: false,
market_buy_by_cost: true,
market_buy_requires_price: true,
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_direction: true,
trigger_price: true
},
fetch_closed_orders: %{
limit: 200,
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
fetch_my_trades: %{
limit: 200,
margin_mode: false,
symbol_required: true
},
fetch_ohlcv: %{
limit: 500
},
fetch_open_orders: %{
limit: 200,
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
fetch_orders: %{
limit: 200,
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
sandbox: false
},
for_derivatives: %{
create_order: %{
trigger_price_type: %{
index: true,
last: true,
mark: true
}
},
extends: "default",
fetch_closed_orders: %{
days_back: 100000,
until_days: 100000
},
fetch_orders: %{
days_back: 100000,
until_days: 100000
}
},
future: %{},
spot: %{
extends: "default"
},
swap: %{
inverse: %{
extends: "forDerivatives"
},
linear: %{
extends: "forDerivatives"
}
}
},
fees: %{
trading: %{
maker: 0.001,
taker: 0.001
}
},
forward_aliases: %{
spot: %{
"BigONE Token" => "ONE"
}
},
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 //\n // {\"code\":10013,\"message\":\"Resource not found\"}\n // {\"code\":40004,\"message\":\"invalid jwt\"}\n //\n const code = this.safeString(response, 'code');\n const message = this.safeString(response, 'message');\n if ((code !== '0') && (code !== undefined)) {\n const feedback = this.id + ' ' + body;\n this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);\n this.throwExactlyMatchedException(this.exceptions['exact'], code, 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: true,
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: true,
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: true,
create_post_only_order_ws: false,
create_reduce_only_order: false,
create_reduce_only_order_ws: false,
create_stop_limit_order: true,
create_stop_limit_order_ws: false,
create_stop_loss_order: false,
create_stop_loss_order_ws: false,
create_stop_market_order: true,
create_stop_market_order_ws: false,
create_stop_order: true,
create_stop_order_ws: false,
create_take_profit_order: false,
create_take_profit_order_ws: false,
create_trailing_amount_order: false,
create_trailing_amount_order_ws: false,
create_trailing_percent_order: false,
create_trailing_percent_order_ws: false,
create_trigger_order: false,
create_trigger_order_ws: false,
deposit: false,
edit_order: true,
edit_order_with_client_order_id: false,
edit_order_ws: false,
edit_orders: false,
fetch_a_d_l_rank: false,
fetch_accounts: false,
fetch_all_greeks: false,
fetch_balance: true,
fetch_balance_ws: false,
fetch_bids_asks: false,
fetch_borrow_interest: false,
fetch_borrow_rate: false,
fetch_borrow_rate_histories: false,
fetch_borrow_rate_history: false,
fetch_borrow_rates: false,
fetch_borrow_rates_per_symbol: false,
fetch_canceled_and_closed_orders: false,
fetch_canceled_orders: false,
fetch_closed_order: false,
fetch_closed_orders: true,
fetch_closed_orders_ws: false,
fetch_convert_currencies: false,
fetch_convert_quote: false,
fetch_convert_trade: false,
fetch_convert_trade_history: false,
fetch_cross_borrow_rate: false,
fetch_cross_borrow_rates: false,
fetch_currencies: true,
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: 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_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: true,
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: 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: 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: true,
swap: true,
transfer: true,
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: "bigone",
markets: nil,
name: "BigONE",
ohlcv_timestamp_resolution: :unknown,
options: %{
:accounts_by_type => %{
"fund" => "FUND",
"funding" => "FUND",
"future" => "CONTRACT",
"spot" => "SPOT",
"swap" => "CONTRACT"
},
:create_market_buy_order_requires_price => true,
:default_network => "ERC20",
:default_networks => %{
"USDT" => "TRC20"
},
"exchange_milliseconds_correction" => -100,
:fetch_currencies => %{
"webApiEnable" => true,
"webApiMuteFailure" => true,
"webApiRetries" => 5
},
:networks => %{
"ABBC" => "ABBC",
"ACA" => "Acala",
"AE" => "Aeternity",
"ALGO" => "Algorand",
"APT" => "Aptos",
"AR" => "Arweave",
"ASTR" => "Astar",
"ATOM" => "Cosmos",
"AVAXC" => "Avax",
"AVAXX" => "AvaxChain",
"BCH" => "BitcoinCash",
"BEAM" => "Beam",
"BEP20" => "BinanceSmartChain",
"BITCI" => "BitciChain",
"BSV" => "BitcoinSV",
"BTC" => "Bitcoin",
"CELO" => "Celo",
"CKKB" => "CKB",
"CRC20" => "CRO",
"DASH" => "Dash",
"DOGE" => "Dogecoin",
"DOT" => "Polkadot",
"EOS" => "EOS",
"ETC" => "EthereumClassic",
"ETH" => "Ethereum",
"ETHW" => "EthereumPow",
"FIL" => "Filecoin",
"FSN" => "Fusion",
"FTM" => "Fantom",
"GLMR" => "Moonbeam",
"GRIN" => "Grin",
"HBAR" => "Hedera",
"HNT" => "Helium",
"HRC20" => "Hecochain",
"IOST" => "IOST",
"IRIS" => "IRIS",
"KLAY" => "Klaytn",
"KSM" => "Kusama",
"LTC" => "Litecoin",
"MATIC" => "Polygon",
"NEAR" => "Near",
"NEO" => "Neo",
"NEON3" => "NeoN3",
"OASIS" => "Oasis",
"OKC" => "Okexchain",
"ONE" => "Harmony",
"ONT" => "Ontology",
"OPTIMISM" => "Optimism",
"QTUM" => "Qtum",
"REI" => "REI",
"SDN" => "Shiden",
"SGB" => "SGB",
"SOL" => "Solana",
"TERA" => "Tera",
"TRC20" => "Tron",
"VET" => "Vechain",
"VSYS" => "VSystems",
"WAX" => "WAX",
"XEC" => "ECash",
"XLM" => "Stellar",
"XMR" => "Monero",
"XRP" => "Ripple",
"XTZ" => "Tezos",
"ZEC" => "Zcash",
"ZEN" => "Horizen"
},
:transfer => %{
"fillResponseFromRequest" => true
}
},
order_mappings: %{
side_format: nil,
side_key: "side",
type_format: :uppercase,
type_key: "type"
},
param_mappings: %{
"address" => "target_address",
"code" => "symbol",
"cost" => "amount",
"fromAccount" => "from",
"symbol" => "asset_pair_name",
"timeframe" => "period",
"toAccount" => "to",
"triggerPrice" => "stop_price"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 1414,
"line_start" => 1397,
"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 balances = this.safeList (response, 'data', []);\n for (let i = 0; i < balances.length; i++) {\n const balance = balances[i];\n const symbol = this.safeString (balance, 'asset_symbol');\n const code = this.safeCurrencyCode (symbol);\n const account = this.account ();\n account['total'] = this.safeString (balance, 'balance');\n account['used'] = this.safeString (balance, 'locked_balance');\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1107,
"line_start" => 1098,
"mappings" => [],
"name" => "parseContractBidsAsks",
"signature" => "parseContractBidsAsks (bidsAsks)",
"source" => "parseContractBidsAsks (bidsAsks) {\n const bidsAsksKeys = Object.keys (bidsAsks);\n const result = [];\n for (let i = 0; i < bidsAsksKeys.length; i++) {\n const price = bidsAsksKeys[i];\n const amount = bidsAsks[price];\n result.push ([ this.parseNumber (price), this.parseNumber (amount) ]);\n }\n return result;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1122,
"line_start" => 1109,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "bids",
"value" => "this.filterByLimit (this.sortBy (bids, 0, true), limit)"
},
%{
"comment" => nil,
"key" => "asks",
"value" => "this.filterByLimit (this.sortBy (asks, 0), limit)"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "nonce",
"value" => "undefined"
}
],
"name" => "parseContractOrderBook",
"signature" => "parseContractOrderBook (orderbook: object, symbol: string, limit: Int = undefined): OrderBook",
"source" => "parseContractOrderBook (orderbook: object, symbol: string, limit: Int = undefined): OrderBook {\n const responseBids = this.safeValue (orderbook, 'bids');\n const responseAsks = this.safeValue (orderbook, 'asks');\n const bids = this.parseContractBidsAsks (responseBids);\n const asks = this.parseContractBidsAsks (responseAsks);\n return {\n 'symbol': symbol,\n 'bids': this.filterByLimit (this.sortBy (bids, 0, true), limit),\n 'asks': this.filterByLimit (this.sortBy (asks, 0), limit),\n 'timestamp': undefined,\n 'datetime': undefined,\n 'nonce': undefined,\n } as any;\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"close\": \"0.021562\",\n \"high\": \"0.021563\",\n \"low\": \"0.02156\",\n \"open\": \"0.021563\",\n \"time\": \"2019-11-21T07:54:00Z\",\n \"volume\": \"59.84376\"\n }"
],
"line_end" => 1324,
"line_start" => 1305,
"mappings" => [],
"name" => "parseOHLCV",
"signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV",
"source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // {\n // \"close\": \"0.021562\",\n // \"high\": \"0.021563\",\n // \"low\": \"0.02156\",\n // \"open\": \"0.021563\",\n // \"time\": \"2019-11-21T07:54:00Z\",\n // \"volume\": \"59.84376\"\n // }\n //\n return [\n this.parse8601 (this.safeString (ohlcv, 'time')),\n this.safeNumber (ohlcv, 'open'),\n this.safeNumber (ohlcv, 'high'),\n this.safeNumber (ohlcv, 'low'),\n this.safeNumber (ohlcv, 'close'),\n this.safeNumber (ohlcv, 'volume'),\n ];\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": \"42154072252\",\n \"asset_pair_name\": \"SOL-USDT\",\n \"price\": \"20\",\n \"amount\": \"0.5\",\n \"filled_amount\": \"0\",\n \"avg_deal_price\": \"0\",\n \"side\": \"ASK\",\n \"state\": \"PENDING\",\n \"created_at\": \"2023-09-13T03:42:00Z\",\n \"updated_at\": \"2023-09-13T03:42:00Z\",\n \"type\": \"LIMIT\",\n \"stop_price\": \"0\",\n \"immediate_or_cancel\": false,\n \"post_only\": false,\n \"client_order_id\": ''\n }"
],
"line_end" => 1531,
"line_start" => 1458,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "this.safeString (order, 'client_order_id')"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "lastTradeTimestamp",
"value" => "this.parse8601 (this.safeString (order, 'updated_at'))"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "timeInForce"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "this.safeBool (order, 'post_only')"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "triggerPrice"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "cost"
},
%{
"comment" => nil,
"key" => "average",
"value" => "this.safeString (order, 'avg_deal_price')"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "filled"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseOrderStatus (this.safeString (order, 'state'))"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
}
],
"name" => "parseOrder",
"signature" => "parseOrder (order: Dict, market: Market = undefined): Order",
"source" => "parseOrder (order: Dict, market: Market = undefined): Order {\n //\n // {\n // \"id\": \"42154072252\",\n // \"asset_pair_name\": \"SOL-USDT\",\n // \"price\": \"20\",\n // \"amount\": \"0.5\",\n // \"filled_amount\": \"0\",\n // \"avg_deal_price\": \"0\",\n // \"side\": \"ASK\",\n // \"state\": \"PENDING\",\n // \"created_at\": \"2023-09-13T03:42:00Z\",\n // \"updated_at\": \"2023-09-13T03:42:00Z\",\n // \"type\": \"LIMIT\",\n // \"stop_price\": \"0\",\n // \"immediate_or_cancel\": false,\n // \"post_only\": false,\n // \"client_order_id\": ''\n // }\n //\n const id = this.safeString (order, 'id');\n const marketId = this.safeString (order, 'asset_pair_name');\n const symbol = this.safeSymbol (marketId, market, '-');\n const timestamp = this.parse8601 (this.safeString (order, 'created_at'));\n let side = this.safeString (order, 'side');\n if (side === 'BID') {\n side = 'buy';\n } else {\n side = 'sell';\n }\n let triggerPrice = this.safeString (order, 'stop_price');\n if (Precise.stringEq (triggerPrice, '0')) {\n triggerPrice = undefined;\n }\n const immediateOrCancel = this.safeBool (order, 'immediate_or_cancel');\n let timeInForce = undefined;\n if (immediateOrCancel) {\n timeInForce = 'IOC';\n }\n const type = this.parseType (this.safeString (order, 'type'));\n const price = this.safeString (order, 'price');\n let amount = undefined;\n let filled = undefined;\n let cost = undefined;\n if (type === 'market' && side === 'buy') {\n cost = this.safeString (order, 'filled_amount');\n } else {\n amount = this.safeString (order, 'amount');\n filled = this.safeString (order, 'filled_amount');\n }\n return this.safeOrder ({\n 'info': order,\n 'id': id,\n 'clientOrderId': this.safeString (order, 'client_order_id'),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': this.parse8601 (this.safeString (order, 'updated_at')),\n 'symbol': symbol,\n 'type': type,\n 'timeInForce': timeInForce,\n 'postOnly': this.safeBool (order, 'post_only'),\n 'side': side,\n 'price': price,\n 'triggerPrice': triggerPrice,\n 'amount': amount,\n 'cost': cost,\n 'average': this.safeString (order, 'avg_deal_price'),\n 'filled': filled,\n 'remaining': undefined,\n 'status': this.parseOrderStatus (this.safeString (order, 'state')),\n 'fee': undefined,\n 'trades': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1884,
"line_start" => 1877,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: Str)",
"source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'PENDING': 'open',\n 'FILLED': 'closed',\n 'CANCELLED': 'canceled',\n };\n return this.safeString (statuses, status);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"asset_pair_name\": \"ETH-BTC\",\n \"bid\": {\n \"price\": \"0.021593\",\n \"order_count\": 1,\n \"quantity\": \"0.20936\"\n },\n \"ask\": {\n \"price\": \"0.021613\",\n \"order_count\": 1,\n \"quantity\": \"2.87064\"\n },\n \"open\": \"0.021795\",\n \"high\": \"0.021795\",\n \"low\": \"0.021471\",\n \"close\": \"0.021613\",\n \"volume\": \"117078.90431\",\n \"daily_change\": \"-0.000182\"\n }",
"{\n \"usdtPrice\": 1.00031998,\n \"symbol\": \"BTCUSD\",\n \"btcPrice\": 34700.4,\n \"ethPrice\": 1787.83,\n \"nextFundingRate\": 0.00010,\n \"fundingRate\": 0.00010,\n \"latestPrice\": 34708.5,\n \"last24hPriceChange\": 0.0321,\n \"indexPrice\": 34700.4,\n \"volume24h\": 261319063,\n \"turnover24h\": 8204.129380685496,\n \"nextFundingTime\": 1698285600000,\n \"markPrice\": 34702.4646738,\n \"last24hMaxPrice\": 35127.5,\n \"volume24hInUsd\": 0.0,\n \"openValue\": 32.88054722085945,\n \"last24hMinPrice\": 33552.0,\n \"openInterest\": 1141372.0\n }"
],
"line_end" => 869,
"line_start" => 792,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "high",
"value" => "this.safeString2 (ticker, 'high', 'last24hMaxPrice')"
},
%{
"comment" => nil,
"key" => "low",
"value" => "this.safeString2 (ticker, 'low', 'last24hMinPrice')"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeString (bid, 'price')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "this.safeString (bid, 'quantity')"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeString (ask, 'price')"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "this.safeString (ask, 'quantity')"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "open",
"value" => "this.safeString (ticker, 'open')"
},
%{
"comment" => nil,
"key" => "last",
"value" => "close"
},
%{
"comment" => nil,
"key" => "previousClose",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "change",
"value" => "this.safeString (ticker, 'daily_change')"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "this.safeString2 (ticker, 'volume', 'volume24h')"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "this.safeString (ticker, 'volume24hInUsd')"
},
%{
"comment" => nil,
"key" => "markPrice",
"value" => "this.safeString (ticker, 'markPrice')"
},
%{
"comment" => nil,
"key" => "indexPrice",
"value" => "this.safeString (ticker, 'indexPrice')"
},
%{
"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 // spot\n //\n // {\n // \"asset_pair_name\": \"ETH-BTC\",\n // \"bid\": {\n // \"price\": \"0.021593\",\n // \"order_count\": 1,\n // \"quantity\": \"0.20936\"\n // },\n // \"ask\": {\n // \"price\": \"0.021613\",\n // \"order_count\": 1,\n // \"quantity\": \"2.87064\"\n // },\n // \"open\": \"0.021795\",\n // \"high\": \"0.021795\",\n // \"low\": \"0.021471\",\n // \"close\": \"0.021613\",\n // \"volume\": \"117078.90431\",\n // \"daily_change\": \"-0.000182\"\n // }\n //\n // contract\n //\n // {\n // \"usdtPrice\": 1.00031998,\n // \"symbol\": \"BTCUSD\",\n // \"btcPrice\": 34700.4,\n // \"ethPrice\": 1787.83,\n // \"nextFundingRate\": 0.00010,\n // \"fundingRate\": 0.00010,\n // \"latestPrice\": 34708.5,\n // \"last24hPriceChange\": 0.0321,\n // \"indexPrice\": 34700.4,\n // \"volume24h\": 261319063,\n // \"turnover24h\": 8204.129380685496,\n // \"nextFundingTime\": 1698285600000,\n // \"markPrice\": 34702.4646738,\n // \"last24hMaxPrice\": 35127.5,\n // \"volume24hInUsd\": 0.0,\n // \"openValue\": 32.88054722085945,\n // \"last24hMinPrice\": 33552.0,\n // \"openInterest\": 1141372.0\n // }\n //\n const marketType = ('asset_pair_name' in ticker) ? 'spot' : 'swap';\n const marketId = this.safeString2 (ticker, 'asset_pair_name', 'symbol');\n const symbol = this.safeSymbol (marketId, market, '-', marketType);\n const close = this.safeString2 (ticker, 'close', 'latestPrice');\n const bid = this.safeDict (ticker, 'bid', {});\n const ask = this.safeDict (ticker, 'ask', {});\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'high': this.safeString2 (ticker, 'high', 'last24hMaxPrice'),\n 'low': this.safeString2 (ticker, 'low', 'last24hMinPrice'),\n 'bid': this.safeString (bid, 'price'),\n 'bidVolume': this.safeString (bid, 'quantity'),\n 'ask': this.safeString (ask, 'price'),\n 'askVolume': this.safeString (ask, 'quantity'),\n 'vwap': undefined,\n 'open': this.safeString (ticker, 'open'), // openValue is a broken number, we don't use it\n 'close': close,\n 'last': close,\n 'previousClose': undefined,\n 'change': this.safeString (ticker, 'daily_change'), // last24hPriceChange is incorrect value, eg see PUMPUSDT contract\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': this.safeString2 (ticker, 'volume', 'volume24h'),\n 'quoteVolume': this.safeString (ticker, 'volume24hInUsd'),\n 'markPrice': this.safeString (ticker, 'markPrice'),\n 'indexPrice': this.safeString (ticker, 'indexPrice'),\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": 38199941,\n \"price\": \"3378.67\",\n \"amount\": \"0.019812\",\n \"taker_side\": \"ASK\",\n \"created_at\": \"2019-01-29T06:05:56Z\"\n }",
"{\n \"id\": 10854280,\n \"asset_pair_name\": \"XIN-USDT\",\n \"price\": \"70\",\n \"amount\": \"1\",\n \"taker_side\": \"ASK\",\n \"maker_order_id\": 58284908,\n \"taker_order_id\": 58284909,\n \"maker_fee\": \"0.0008\",\n \"taker_fee\": \"0.07\",\n \"side\": \"SELF_TRADING\",\n \"inserted_at\": \"2019-04-16T12:00:01Z\"\n },",
"{\n \"id\": 10854263,\n \"asset_pair_name\": \"XIN-USDT\",\n \"price\": \"75.7\",\n \"amount\": \"12.743149\",\n \"taker_side\": \"BID\",\n \"maker_order_id\": null,\n \"taker_order_id\": 58284888,\n \"maker_fee\": null,\n \"taker_fee\": \"0.0025486298\",\n \"side\": \"BID\",\n \"inserted_at\": \"2019-04-15T06:20:57Z\"\n }"
],
"line_end" => 1257,
"line_start" => 1124,
"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" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "order",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "type",
"value" => "'limit'"
},
%{
"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" => "info",
"value" => "trade"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // fetchTrades (public)\n //\n // {\n // \"id\": 38199941,\n // \"price\": \"3378.67\",\n // \"amount\": \"0.019812\",\n // \"taker_side\": \"ASK\",\n // \"created_at\": \"2019-01-29T06:05:56Z\"\n // }\n //\n // fetchMyTrades (private)\n //\n // {\n // \"id\": 10854280,\n // \"asset_pair_name\": \"XIN-USDT\",\n // \"price\": \"70\",\n // \"amount\": \"1\",\n // \"taker_side\": \"ASK\",\n // \"maker_order_id\": 58284908,\n // \"taker_order_id\": 58284909,\n // \"maker_fee\": \"0.0008\",\n // \"taker_fee\": \"0.07\",\n // \"side\": \"SELF_TRADING\",\n // \"inserted_at\": \"2019-04-16T12:00:01Z\"\n // },\n //\n // {\n // \"id\": 10854263,\n // \"asset_pair_name\": \"XIN-USDT\",\n // \"price\": \"75.7\",\n // \"amount\": \"12.743149\",\n // \"taker_side\": \"BID\",\n // \"maker_order_id\": null,\n // \"taker_order_id\": 58284888,\n // \"maker_fee\": null,\n // \"taker_fee\": \"0.0025486298\",\n // \"side\": \"BID\",\n // \"inserted_at\": \"2019-04-15T06:20:57Z\"\n // }\n //\n const timestamp = this.parse8601 (this.safeString2 (trade, 'created_at', 'inserted_at'));\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'amount');\n const marketId = this.safeString (trade, 'asset_pair_name');\n market = this.safeMarket (marketId, market, '-');\n let side = this.safeString (trade, 'side');\n const takerSide = this.safeString (trade, 'taker_side');\n let takerOrMaker: Str = undefined;\n if ((takerSide !== undefined) && (side !== undefined) && (side !== 'SELF_TRADING')) {\n takerOrMaker = (takerSide === side) ? 'taker' : 'maker';\n }\n if (side === undefined) {\n // taker side is not related to buy/sell side\n // the following code is probably a mistake\n side = (takerSide === 'ASK') ? 'sell' : 'buy';\n } else {\n if (side === 'BID') {\n side = 'buy';\n } else if (side === 'ASK') {\n side = 'sell';\n }\n }\n const makerOrderId = this.safeString (trade, 'maker_order_id');\n const takerOrderId = this.safeString (trade, 'taker_order_id');\n let orderId: Str = undefined;\n if (makerOrderId !== undefined) {\n orderId = makerOrderId;\n } else if (takerOrderId !== undefined) {\n orderId = takerOrderId;\n }\n const id = this.safeString (trade, 'id');\n const result: Dict = {\n 'id': id,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': market['symbol'],\n 'order': orderId,\n 'type': 'limit',\n 'side': side,\n 'takerOrMaker': takerOrMaker,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'info': trade,\n };\n let makerCurrencyCode: string;\n let takerCurrencyCode: string;\n if (takerOrMaker !== undefined) {\n if (side === 'buy') {\n if (takerOrMaker === 'maker') {\n makerCurrencyCode = market['base'];\n takerCurrencyCode = market['quote'];\n } else {\n makerCurrencyCode = market['quote'];\n takerCurrencyCode = market['base'];\n }\n } else {\n if (takerOrMaker === 'maker') {\n makerCurrencyCode = market['quote'];\n takerCurrencyCode = market['base'];\n } else {\n makerCurrencyCode = market['base'];\n takerCurrencyCode = market['quote'];\n }\n }\n } else if (side === 'SELF_TRADING') {\n if (takerSide === 'BID') {\n makerCurrencyCode = market['quote'];\n takerCurrencyCode = market['base'];\n } else if (takerSide === 'ASK') {\n makerCurrencyCode = market['base'];\n takerCurrencyCode = market['quote'];\n }\n }\n const makerFeeCost = this.safeString (trade, 'maker_fee');\n const takerFeeCost = this.safeString (trade, 'taker_fee');\n if (makerFeeCost !== undefined) {\n if (takerFeeCost !== undefined) {\n result['fees'] = [\n { 'cost': makerFeeCost, 'currency': makerCurrencyCode },\n { 'cost': takerFeeCost, 'currency': takerCurrencyCode },\n ];\n } else {\n result['fee'] = { 'cost': makerFeeCost, 'currency': makerCurrencyCode };\n }\n } else if (takerFeeCost !== undefined) {\n result['fee'] = { 'cost': takerFeeCost, 'currency': takerCurrencyCode };\n } else {\n result['fee'] = undefined;\n }\n return this.safeTrade (result as any, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"amount\": \"25.0\",\n \"asset_symbol\": \"BTS\"\n \"confirms\": 100,\n \"id\": 5,\n \"inserted_at\": \"2018-02-16T11:39:58.000Z\",\n \"is_internal\": false,\n \"kind\": \"default\",\n \"memo\": \"\",\n \"state\": \"WITHHOLD\",\n \"txid\": \"72e03037d144dae3d32b68b5045462b1049a0755\",\n \"updated_at\": \"2018-11-09T10:20:09.000Z\",\n }",
"{\n \"amount\": \"5\",\n \"asset_symbol\": \"ETH\",\n \"completed_at\": \"2018-03-15T16:13:45.610463Z\",\n \"customer_id\": \"10\",\n \"id\": 10,\n \"inserted_at\": \"2018-03-15T16:13:45.610463Z\",\n \"is_internal\": true,\n \"note\": \"2018-03-15T16:13:45.610463Z\",\n \"state\": \"CONFIRMED\",\n \"target_address\": \"0x4643bb6b393ac20a6175c713175734a72517c63d6f7\"\n \"txid\": \"0x4643bb6b393ac20a6175c713175734a72517c63d6f73a3ca90a15356f2e967da0\",\n }",
"{\n \"id\":1077391,\n \"customer_id\":1082679,\n \"amount\":\"21.9000000000000000\",\n \"txid\":\"\",\n \"is_internal\":false,\n \"kind\":\"on_chain\",\n \"state\":\"PENDING\",\n \"inserted_at\":\"2020-06-03T00:50:57+00:00\",\n \"updated_at\":\"2020-06-03T00:50:57+00:00\",\n \"memo\":\"\",\n \"target_address\":\"rDYtYT3dBeuw376rvHqoZBKW3UmvguoBAf\",\n \"fee\":\"0.1000000000000000\",\n \"asset_symbol\":\"XRP\"\n }"
],
"line_end" => 2112,
"line_start" => 2026,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "transaction"
},
%{
"comment" => nil,
"key" => "id",
"value" => "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" => "addressFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "address"
},
%{
"comment" => nil,
"key" => "tagFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "tag"
},
%{
"comment" => nil,
"key" => "tagTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "code"
},
%{
"comment" => nil,
"key" => "status",
"value" => "status"
},
%{
"comment" => nil,
"key" => "updated",
"value" => "updated"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "comment",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "internal"
}
],
"name" => "parseTransaction",
"signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction",
"source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // fetchDeposits\n //\n // {\n // \"amount\": \"25.0\",\n // \"asset_symbol\": \"BTS\"\n // \"confirms\": 100,\n // \"id\": 5,\n // \"inserted_at\": \"2018-02-16T11:39:58.000Z\",\n // \"is_internal\": false,\n // \"kind\": \"default\",\n // \"memo\": \"\",\n // \"state\": \"WITHHOLD\",\n // \"txid\": \"72e03037d144dae3d32b68b5045462b1049a0755\",\n // \"updated_at\": \"2018-11-09T10:20:09.000Z\",\n // }\n //\n // fetchWithdrawals\n //\n // {\n // \"amount\": \"5\",\n // \"asset_symbol\": \"ETH\",\n // \"completed_at\": \"2018-03-15T16:13:45.610463Z\",\n // \"customer_id\": \"10\",\n // \"id\": 10,\n // \"inserted_at\": \"2018-03-15T16:13:45.610463Z\",\n // \"is_internal\": true,\n // \"note\": \"2018-03-15T16:13:45.610463Z\",\n // \"state\": \"CONFIRMED\",\n // \"target_address\": \"0x4643bb6b393ac20a6175c713175734a72517c63d6f7\"\n // \"txid\": \"0x4643bb6b393ac20a6175c713175734a72517c63d6f73a3ca90a15356f2e967da0\",\n // }\n //\n // withdraw\n //\n // {\n // \"id\":1077391,\n // \"customer_id\":1082679,\n // \"amount\":\"21.9000000000000000\",\n // \"txid\":\"\",\n // \"is_internal\":false,\n // \"kind\":\"on_chain\",\n // \"state\":\"PENDING\",\n // \"inserted_at\":\"2020-06-03T00:50:57+00:00\",\n // \"updated_at\":\"2020-06-03T00:50:57+00:00\",\n // \"memo\":\"\",\n // \"target_address\":\"rDYtYT3dBeuw376rvHqoZBKW3UmvguoBAf\",\n // \"fee\":\"0.1000000000000000\",\n // \"asset_symbol\":\"XRP\"\n // }\n //\n const currencyId = this.safeString (transaction, 'asset_symbol');\n const code = this.safeCurrencyCode (currencyId);\n const id = this.safeString (transaction, 'id');\n const amount = this.safeNumber (transaction, 'amount');\n const status = this.parseTransactionStatus (this.safeString (transaction, 'state'));\n const timestamp = this.parse8601 (this.safeString (transaction, 'inserted_at'));\n const updated = this.parse8601 (this.safeString2 (transaction, 'updated_at', 'completed_at'));\n const txid = this.safeString (transaction, 'txid');\n const address = this.safeString (transaction, 'target_address');\n const tag = this.safeString (transaction, 'memo');\n const type = ('customer_id' in transaction) ? 'withdrawal' : 'deposit';\n const internal = this.safeBool (transaction, 'is_internal');\n return {\n 'info': transaction,\n 'id': id,\n 'txid': txid,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': undefined,\n 'addressFrom': undefined,\n 'address': undefined,\n 'addressTo': address,\n 'tagFrom': undefined,\n 'tag': tag,\n 'tagTo': undefined,\n 'type': type,\n 'amount': amount,\n 'currency': code,\n 'status': status,\n 'updated': updated,\n 'fee': undefined,\n 'comment': undefined,\n 'internal': internal,\n } as Transaction;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 2024,
"line_start" => 2014,
"mappings" => [],
"name" => "parseTransactionStatus",
"signature" => "parseTransactionStatus (status: Str)",
"source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n // what are other statuses here?\n 'WITHHOLD': 'ok', // deposits\n 'UNCONFIRMED': 'pending',\n 'CONFIRMED': 'ok', // withdrawals\n 'COMPLETED': 'ok',\n 'PENDING': 'pending',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"code\": 0,\n \"data\": null\n }"
],
"line_end" => 2286,
"line_start" => 2267,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "transfer"
},
%{
"comment" => nil,
"key" => "id",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fromAccount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "toAccount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseTransferStatus (code)"
}
],
"name" => "parseTransfer",
"signature" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry",
"source" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry {\n //\n // {\n // \"code\": 0,\n // \"data\": null\n // }\n //\n const code = this.safeString (transfer, 'code');\n return {\n 'info': transfer,\n 'id': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'currency': undefined,\n 'amount': undefined,\n 'fromAccount': undefined,\n 'toAccount': undefined,\n 'status': this.parseTransferStatus (code),\n };\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 2293,
"line_start" => 2288,
"mappings" => [],
"name" => "parseTransferStatus",
"signature" => "parseTransferStatus (status: Str): Str",
"source" => "parseTransferStatus (status: Str): Str {\n const statuses: Dict = {\n '0': 'ok',\n };\n return this.safeString (statuses, status, 'failed');\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1456,
"line_start" => 1448,
"mappings" => [],
"name" => "parseType",
"signature" => "parseType (type: string)",
"source" => "parseType (type: string) {\n const types: Dict = {\n 'STOP_LIMIT': 'limit',\n 'STOP_MARKET': 'market',\n 'LIMIT': 'limit',\n 'MARKET': 'market',\n };\n return this.safeString (types, type, type);\n }"
}
],
path_prefix: "",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 20,
period: 1000,
requests: 50,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [],
public: []
},
required_credentials: %{
api_key: true,
password: false,
secret: true,
uid: false
},
requires_eddsa: false,
response_error: %{
code_field: "code",
field: "code",
message_field: "msg",
success_values: [
"0"
],
type: :success_code
},
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" => %{
"max" => 500000,
"min" => 10
},
"price" => %{}
},
sample_precision: %{
"amount" => 0.01,
"price" => 1.0e-5
},
spot: %{
base: "SAHARA3S",
base_id: "SAHARA3S",
case: :upper,
contract: false,
id: "SAHARA3S-USDT",
limits: %{
"amount" => %{},
"cost" => %{
"max" => 500000,
"min" => 10
},
"leverage" => %{},
"price" => %{}
},
precision: %{
"amount" => 0.01,
"price" => 1.0e-5
},
quote: "USDT",
quote_id: "USDT",
separator: "-",
symbol: "SAHARA3S/USDT"
},
swap: %{
base: "BTC",
base_id: "BTC",
case: :upper,
contract: true,
contract_size: 1,
id: "BTCUSD",
inverse: true,
limits: %{
"amount" => %{},
"cost" => %{
"min" => 0.01
},
"leverage" => %{},
"price" => %{
"max" => 1000000,
"min" => 0.5
}
},
linear: false,
precision: %{
"amount" => 0.0001,
"price" => 0.1
},
quote: "USD",
quote_id: "USD",
separator: "",
settle: "BTC",
settle_id: "BTC",
symbol: "BTC/USD:BTC"
}
},
symbol_patterns: %{
spot: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :dash_upper,
prefix: nil,
separator: "-",
suffix: nil
},
swap: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :implicit,
prefix: nil,
separator: "",
suffix: nil
}
},
timeframes: %{
"12h" => "hour12",
"15m" => "min15",
"1M" => "month1",
"1d" => "day1",
"1h" => "hour1",
"1m" => "min1",
"1w" => "week1",
"30m" => "min30",
"3h" => "hour3",
"4h" => "hour4",
"5m" => "min5",
"6h" => "hour6"
},
url_strategy: %{
detected_from: "fallback",
pattern: :no_prefix,
prefix: nil
},
urls: %{
api: "https://big.one/api/v3",
api_sections: %{
"contractPrivate" => "https://big.one/api/contract/v2",
"contractPublic" => "https://big.one/api/contract/v2",
"private" => "https://big.one/api/v3/viewer",
"public" => "https://big.one/api/v3",
"webExchange" => "https://big.one/api/"
},
doc: "https://open.big.one/docs/api.html",
other: nil,
sandbox: nil,
www: "https://big.one"
},
version: "v3",
ws: nil
}