Packages

Elixir client library for cryptocurrency exchanges — generated from CCXT specs via compile-time macros.

Current section

Files

Jump to
ccxt_client priv specs extracted zonda.exs
Raw

priv/specs/extracted/zonda.exs

# Zonda Exchange Specification
#
# Auto-generated by: mix ccxt.extract zonda
# CCXT version: 4.5.34
# Spec format version: 1
#
# Review before use:
# - signing: Detected from sign() method, verify with testnet
# - endpoints: Raw paths extracted, map to unified API as needed
# - exceptions: Extracted (exact, broad, HTTP status codes)
# - features/options: Extracted from describe()
# - classification: Set to :supported initially, promote after validation
#
%{
api_param_requirements: nil,
certified: false,
classification: :supported,
comment: nil,
countries: [
"EE"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"GGC" => "Global Game Coin",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 18,
"coveragePercent" => 100,
"enabledMethods" => 20,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 1,
"extractableMethods" => 19,
"failures" => [
%{
"error" => "zonda cancelOrder() requires a `price` parameter (float or string)",
"method" => "cancelOrder"
}
]
},
endpoints: [
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
default_params: %{
"mode" => "limit"
},
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"price" => "rate",
"side" => "offerType"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/trading/offer/{symbol}",
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
default_params: %{
"mode" => "market"
},
market_type: :spot,
method: :post,
name: :create_market_order,
param_mappings: %{
"side" => "offerType"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/trading/offer/{symbol}",
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"price" => "rate",
"side" => "offerType",
"type" => "mode"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/trading/offer/{symbol}",
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/balances/BITBAY/balance",
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_deposit_address,
param_mappings: %{
"code" => "currency"
},
params: [
:code
],
path: "/api_payments/deposits/crypto/addresses",
response_transformer: {:extract_path_unwrap, ["data"]},
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_deposit_addresses,
param_mappings: %{},
params: [
:codes
],
path: "/api_payments/deposits/crypto/addresses",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
},
%{
api_section: "v1_01Public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/trading/orderbook/{symbol}",
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
default_params: %{
"query" => "{\"balanceCurrencies\":[\"BTC\"]}"
},
market_type: :spot,
method: :get,
name: :fetch_ledger,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/balances/BITBAY/history",
source: :intercepted
},
%{
api_section: "v1_01Public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/trading/ticker",
response_transformer: {:extract_path, ["items"]},
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
default_params: %{
"query" => "{\"markets\":[\"BTCUSDT\"]}"
},
market_type: :spot,
method: :get,
name: :fetch_my_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/trading/history/transactions",
response_transformer: {:extract_path, ["items"]},
source: :intercepted
},
%{
api_section: "v1_01Public",
auth: false,
cost: 1,
default_params: %{
"resolution" => "3600",
"to" => "<generated>"
},
market_type: :spot,
method: :get,
name: :fetch_ohlcv,
param_mappings: %{
"since" => "from",
"timeframe" => "resolution"
},
params: [
:symbol,
:timeframe,
:since,
:limit
],
path: "/trading/candle/history/{symbol}/{resolution}",
response_transformer: {:extract_path, ["items"]},
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_open_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/trading/offer",
response_transformer: {:extract_path, ["items"]},
source: :intercepted
},
%{
api_section: "v1_01Public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/trading/orderbook/{symbol}",
source: :intercepted
},
%{
api_section: "v1_01Public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{},
params: [
:symbol
],
path: "/trading/ticker/{symbol}",
response_transformer: {:extract_path_unwrap, ["ticker"]},
source: :intercepted
},
%{
api_section: "v1_01Public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_tickers,
param_mappings: %{},
params: [
:symbols
],
path: "/trading/ticker",
response_transformer: {:extract_path, ["items"]},
source: :intercepted
},
%{
api_section: "v1_01Public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"since" => "fromTime"
},
params: [
:symbol,
:since,
:limit
],
path: "/trading/transactions/{symbol}",
response_transformer: {:extract_path, ["items"]},
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :transfer,
param_mappings: %{
"amount" => "funds",
"code" => "currency",
"fromAccount" => "source",
"toAccount" => "destination"
},
params: [
:code,
:amount,
:fromAccount,
:toAccount
],
path: "/balances/BITBAY/balance/transfer/{source}/{destination}",
source: :intercepted
},
%{
api_section: "v1_01Private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :withdraw,
param_mappings: %{
"code" => "currency"
},
params: [
:code,
:amount,
:address,
:tag
],
path: "/api_payments/withdrawals/crypto",
response_transformer: {:extract_path, ["data"]},
source: :intercepted
}
],
error_code_details: %{
400 => %{
description: "At least one parameter wasn't set",
type: :exchange_error
},
401 => %{
description: "Invalid order type",
type: :invalid_order
},
402 => %{
description: "No orders with specified currencies",
type: :invalid_order
},
403 => %{
description: "Invalid payment currency name",
type: :invalid_order
},
404 => %{
description: "Error. Wrong transaction type",
type: :invalid_order
},
405 => %{
description: "Order with this id doesn't exist",
type: :invalid_order
},
406 => %{
description: "No enough money or crypto",
type: :insufficient_balance
},
408 => %{
description: "Invalid currency name",
type: :invalid_order
},
501 => %{
description: "Invalid public key",
type: :invalid_credentials
},
502 => %{
description: "Invalid sign",
type: :invalid_credentials
},
503 => %{
description: "Invalid moment parameter. Request time doesn't match current server time",
type: :invalid_credentials
},
504 => %{
description: "Invalid method",
type: :exchange_error
},
505 => %{
description: "Key has no permission for this action",
type: :invalid_credentials
},
506 => %{
description: "Account locked. Please contact with customer service",
type: :access_restricted
},
509 => %{
description: "The BIC/SWIFT is required for this currency",
type: :exchange_error
},
510 => %{
description: "Invalid market name",
type: :invalid_order
},
"ACTION_BLOCKED" => %{
description: nil,
type: :access_restricted
},
"ACTION_LIMIT_EXCEEDED" => %{
description: nil,
type: :rate_limited
},
"FUNDS_NOT_SUFFICIENT" => %{
description: nil,
type: :insufficient_balance
},
"INVALID_HASH_SIGNATURE" => %{
description: nil,
type: :invalid_credentials
},
"INVALID_STOP_RATE" => %{
description: nil,
type: :invalid_order
},
"OFFER_FUNDS_NOT_EXCEEDING_MINIMUMS" => %{
description: nil,
type: :invalid_order
},
"OFFER_NOT_FOUND" => %{
description: nil,
type: :order_not_found
},
"OFFER_WOULD_HAVE_BEEN_PARTIALLY_FILLED" => %{
description: nil,
type: :invalid_order
},
"PERMISSIONS_NOT_SUFFICIENT" => %{
description: nil,
type: :access_restricted
},
"REQUEST_TIMESTAMP_TOO_OLD" => %{
description: nil,
type: :invalid_credentials
},
"RESPONSE_TIMEOUT" => %{
description: nil,
type: :exchange_error
},
"TIMEOUT" => %{
description: nil,
type: :exchange_error
},
"UNDER_MAINTENANCE" => %{
description: nil,
type: :network_error
}
},
error_codes: %{
400 => :exchange_error,
401 => :invalid_order,
402 => :invalid_order,
403 => :invalid_order,
404 => :invalid_order,
405 => :invalid_order,
406 => :insufficient_balance,
408 => :invalid_order,
501 => :invalid_credentials,
502 => :invalid_credentials,
503 => :invalid_credentials,
504 => :exchange_error,
505 => :invalid_credentials,
506 => :access_restricted,
509 => :exchange_error,
510 => :invalid_order,
"ACTION_BLOCKED" => :access_restricted,
"ACTION_LIMIT_EXCEEDED" => :rate_limited,
"FUNDS_NOT_SUFFICIENT" => :insufficient_balance,
"INVALID_HASH_SIGNATURE" => :invalid_credentials,
"INVALID_STOP_RATE" => :invalid_order,
"OFFER_FUNDS_NOT_EXCEEDING_MINIMUMS" => :invalid_order,
"OFFER_NOT_FOUND" => :order_not_found,
"OFFER_WOULD_HAVE_BEEN_PARTIALLY_FILLED" => :invalid_order,
"PERMISSIONS_NOT_SUFFICIENT" => :access_restricted,
"REQUEST_TIMESTAMP_TOO_OLD" => :invalid_credentials,
"RESPONSE_TIMEOUT" => :exchange_error,
"TIMEOUT" => :exchange_error,
"UNDER_MAINTENANCE" => :network_error
},
exceptions: nil,
exchange_options: %{
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"fetchTickerMethod" => "v1_01PublicGetTradingTickerSymbol",
"fetchTickersMethod" => "v1_01PublicGetTradingTicker",
"fiatCurrencies" => [
"EUR",
"USD",
"GBP",
"PLN"
],
"networksById" => %{},
"transfer" => %{
"fillResponseFromRequest" => true
}
},
extended_metadata: %{
fees_url: "https://zondaglobal.com/legal/zonda-exchange/fees",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://user-images.githubusercontent.com/1294454/159202310-a0e38007-5e7c-4ba9-a32f-c8263a0291fe.jpg",
referral_url: "https://auth.zondaglobal.com/ref/jHlbB4mIkdS1"
},
extracted_metadata: %{
ccxt_version: "4.5.34"
},
features: %{
future: %{},
spot: %{
create_order: %{
hedged: false,
iceberg: false,
leverage: false,
margin_mode: false,
market_buy_by_cost: true,
market_buy_requires_price: false,
self_trade_prevention: false,
stop_loss_price: false,
take_profit_price: false,
time_in_force: %{
fok: true,
gtd: false,
ioc: true,
po: true
},
trailing: false,
trigger_direction: false,
trigger_price: true
},
fetch_my_trades: %{
days_back: 100000,
margin_mode: false,
symbol_required: false,
until_days: 100000
},
fetch_ohlcv: %{},
fetch_open_orders: %{
limit: 100,
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
sandbox: false
},
swap: %{}
},
fees: %{
trading: %{
maker: 0,
percentage: true,
taker: 0.001,
tier_based: false
}
},
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 ('code' in response) {\n //\n // bitbay returns the integer \"success\": 1 key from their private API\n // or an integer \"code\" value from 0 to 510 and an error message\n //\n // { \"success\": 1, ... }\n // { 'code': 502, \"message\": \"Invalid sign\" }\n // { 'code': 0, \"message\": \"offer funds not exceeding minimums\" }\n //\n // 400 At least one parameter wasn't set\n // 401 Invalid order type\n // 402 No orders with specified currencies\n // 403 Invalid payment currency name\n // 404 Error. Wrong transaction type\n // 405 Order with this id doesn't exist\n // 406 No enough money or crypto\n // 408 Invalid currency name\n // 501 Invalid public key\n // 502 Invalid sign\n // 503 Invalid moment parameter. Request time doesn't match current server time\n // 504 Invalid method\n // 505 Key has no permission for this action\n // 506 Account locked. Please contact with customer service\n // 509 The BIC/SWIFT is required for this currency\n // 510 Invalid market name\n //\n const code = this.safeString(response, 'code'); // always an integer\n const feedback = this.id + ' ' + body;\n this.throwExactlyMatchedException(this.exceptions, code, feedback);\n throw new errors.ExchangeError(feedback);\n }\n else if ('status' in response) {\n //\n // {\"status\":\"Fail\",\"errors\":[\"OFFER_FUNDS_NOT_EXCEEDING_MINIMUMS\"]}\n //\n const status = this.safeString(response, 'status');\n if (status === 'Fail') {\n const errors$1 = this.safeValue(response, 'errors');\n const feedback = this.id + ' ' + body;\n for (let i = 0; i < errors$1.length; i++) {\n const error = errors$1[i];\n this.throwExactlyMatchedException(this.exceptions, error, feedback);\n }\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: true,
cancel_all_orders: false,
cancel_all_orders_ws: false,
cancel_order: true,
cancel_order_with_client_order_id: false,
cancel_order_ws: false,
cancel_orders: false,
cancel_orders_with_client_order_id: false,
cancel_orders_ws: false,
close_all_positions: false,
close_position: false,
create_deposit_address: false,
create_limit_buy_order: false,
create_limit_buy_order_ws: false,
create_limit_order: true,
create_limit_order_ws: false,
create_limit_sell_order: false,
create_limit_sell_order_ws: false,
create_market_buy_order: false,
create_market_buy_order_with_cost: false,
create_market_buy_order_with_cost_ws: false,
create_market_buy_order_ws: false,
create_market_order: true,
create_market_order_with_cost: false,
create_market_order_with_cost_ws: false,
create_market_order_ws: true,
create_market_sell_order: false,
create_market_sell_order_with_cost: false,
create_market_sell_order_with_cost_ws: false,
create_market_sell_order_ws: false,
create_order: true,
create_order_with_take_profit_and_stop_loss: false,
create_order_with_take_profit_and_stop_loss_ws: false,
create_order_ws: false,
create_orders: false,
create_post_only_order: false,
create_post_only_order_ws: false,
create_reduce_only_order: false,
create_reduce_only_order_ws: false,
create_stop_limit_order: false,
create_stop_limit_order_ws: false,
create_stop_loss_order: false,
create_stop_loss_order_ws: false,
create_stop_market_order: false,
create_stop_market_order_ws: false,
create_stop_order: false,
create_stop_order_ws: false,
create_take_profit_order: false,
create_take_profit_order_ws: false,
create_trailing_amount_order: false,
create_trailing_amount_order_ws: false,
create_trailing_percent_order: false,
create_trailing_percent_order_ws: false,
create_trigger_order: false,
create_trigger_order_ws: false,
deposit: false,
edit_order: true,
edit_order_with_client_order_id: false,
edit_order_ws: false,
edit_orders: false,
fetch_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: 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: true,
fetch_deposit_addresses_by_network: false,
fetch_deposit_withdraw_fee: false,
fetch_deposit_withdraw_fees: false,
fetch_deposits: false,
fetch_deposits_withdrawals: false,
fetch_deposits_ws: false,
fetch_funding_history: false,
fetch_funding_interval: false,
fetch_funding_intervals: false,
fetch_funding_rate: false,
fetch_funding_rate_history: false,
fetch_funding_rates: false,
fetch_greeks: false,
fetch_index_ohlcv: false,
fetch_isolated_borrow_rate: false,
fetch_isolated_borrow_rates: false,
fetch_isolated_positions: false,
fetch_l2_order_book: true,
fetch_l3_order_book: false,
fetch_last_prices: false,
fetch_ledger: 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_price: false,
fetch_mark_prices: false,
fetch_market_leverage_tiers: false,
fetch_markets: true,
fetch_markets_ws: false,
fetch_my_liquidations: false,
fetch_my_settlement_history: false,
fetch_my_trades: 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: false,
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_history: false,
fetch_position_mode: false,
fetch_position_ws: false,
fetch_positions: false,
fetch_positions_for_symbol: false,
fetch_positions_for_symbol_ws: false,
fetch_positions_history: false,
fetch_positions_risk: false,
fetch_positions_ws: false,
fetch_premium_index_ohlcv: false,
fetch_settlement_history: false,
fetch_status: false,
fetch_ticker: true,
fetch_ticker_ws: false,
fetch_tickers: true,
fetch_tickers_ws: false,
fetch_time: false,
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: false,
fetch_withdrawals_ws: false,
future: false,
margin: false,
option: false,
private_api: true,
public_api: true,
reduce_margin: false,
repay_cross_margin: false,
repay_isolated_margin: false,
repay_margin: false,
sandbox: false,
set_leverage: false,
set_margin: false,
set_margin_mode: false,
set_position_mode: false,
sign_in: false,
spot: true,
swap: false,
transfer: 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: "zonda",
markets: nil,
name: "Zonda",
ohlcv_timestamp_resolution: :milliseconds,
options: %{
"fetch_ticker_method" => "v1_01PublicGetTradingTickerSymbol",
"fetch_tickers_method" => "v1_01PublicGetTradingTicker",
"fiat_currencies" => [
"EUR",
"USD",
"GBP",
"PLN"
],
:transfer => %{
"fillResponseFromRequest" => true
}
},
order_mappings: nil,
param_mappings: %{
"amount" => "funds",
"code" => "currency",
"fromAccount" => "source",
"price" => "rate",
"side" => "offerType",
"since" => "fromTime",
"timeframe" => "resolution",
"toAccount" => "destination",
"type" => "mode"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 647,
"line_start" => 631,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const balances = this.safeValue (response, 'balances');\n if (balances === undefined) {\n throw new ExchangeError (this.id + ' empty balance response ' + this.json (response));\n }\n const result: Dict = { 'info': response };\n for (let i = 0; i < balances.length; i++) {\n const balance = balances[i];\n const currencyId = this.safeString (balance, 'currency');\n const code = this.safeCurrencyCode (currencyId);\n const account = this.account ();\n account['used'] = this.safeString (balance, 'lockedFunds');\n account['free'] = this.safeString (balance, 'availableFunds');\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"address\": \"33u5YAEhQbYfjHHPsfMfCoSdEjfwYjVcBE\",\n \"currency\": \"BTC\",\n \"balanceId\": \"5d5d19e7-2265-49c7-af9a-047bcf384f21\",\n \"balanceEngine\": \"BITBAY\",\n \"tag\": null\n }"
],
"line_end" => 1651,
"line_start" => 1631,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "depositAddress"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "this.safeCurrencyCode (currencyId, currency)"
},
%{
"comment" => nil,
"key" => "network",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "address"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "this.safeString (depositAddress, 'tag')"
}
],
"name" => "parseDepositAddress",
"signature" => "parseDepositAddress (depositAddress, currency: Currency = undefined): DepositAddress",
"source" => "parseDepositAddress (depositAddress, currency: Currency = undefined): DepositAddress {\n //\n // {\n // \"address\": \"33u5YAEhQbYfjHHPsfMfCoSdEjfwYjVcBE\",\n // \"currency\": \"BTC\",\n // \"balanceId\": \"5d5d19e7-2265-49c7-af9a-047bcf384f21\",\n // \"balanceEngine\": \"BITBAY\",\n // \"tag\": null\n // }\n //\n const currencyId = this.safeString (depositAddress, 'currency');\n const address = this.safeString (depositAddress, 'address');\n this.checkAddress (address);\n return {\n 'info': depositAddress,\n 'currency': this.safeCurrencyCode (currencyId, currency),\n 'network': undefined,\n 'address': address,\n 'tag': this.safeString (depositAddress, 'tag'),\n } as DepositAddress;\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"historyId\": \"84ea7a29-7da5-4de5-b0c0-871e83cad765\",\n \"balance\": {\n \"id\": \"821ec166-cb88-4521-916c-f4eb44db98df\",\n \"currency\": \"LTC\",\n \"type\": \"CRYPTO\",\n \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n \"name\": \"LTC\"\n },\n \"detailId\": null,\n \"time\": 1506128252968,\n \"type\": \"FUNDS_MIGRATION\",\n \"value\": 0.0009957,\n \"fundsBefore\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n \"fundsAfter\": { \"total\": 0.0009957, \"available\": 0.0009957, \"locked\": 0 },\n \"change\": { \"total\": 0.0009957, \"available\": 0.0009957, \"locked\": 0 }\n }",
"{\n \"historyId\": \"d0fabd8d-9107-4b5e-b9a6-3cab8af70d49\",\n \"balance\": {\n \"id\": \"653ffcf2-3037-4ebe-8e13-d5ea1a01d60d\",\n \"currency\": \"BTG\",\n \"type\": \"CRYPTO\",\n \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n \"name\": \"BTG\"\n },\n \"detailId\": null,\n \"time\": 1508895244751,\n \"type\": \"CREATE_BALANCE\",\n \"value\": 0,\n \"fundsBefore\": { \"total\": null, \"available\": null, \"locked\": null },\n \"fundsAfter\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n \"change\": { \"total\": 0, \"available\": 0, \"locked\": 0 }\n }",
"{\n \"historyId\": \"2b4d52d3-611c-473d-b92c-8a8d87a24e41\",\n \"balance\": {\n \"id\": \"653ffcf2-3037-4ebe-8e13-d5ea1a01d60d\",\n \"currency\": \"BTG\",\n \"type\": \"CRYPTO\",\n \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n \"name\": \"BTG\"\n },\n \"detailId\": null,\n \"time\": 1508895244778,\n \"type\": \"BITCOIN_GOLD_FORK\",\n \"value\": 0.00453512,\n \"fundsBefore\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n \"fundsAfter\": { \"total\": 0.00453512, \"available\": 0.00453512, \"locked\": 0 },\n \"change\": { \"total\": 0.00453512, \"available\": 0.00453512, \"locked\": 0 }\n }",
"{\n \"historyId\": \"3158236d-dae5-4a5d-81af-c1fa4af340fb\",\n \"balance\": {\n \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n \"currency\": \"BTC\",\n \"type\": \"CRYPTO\",\n \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n \"name\": \"BTC\"\n },\n \"detailId\": \"8e83a960-e737-4380-b8bb-259d6e236faa\",\n \"time\": 1520631178816,\n \"type\": \"ADD_FUNDS\",\n \"value\": 0.628405,\n \"fundsBefore\": { \"total\": 0.00453512, \"available\": 0.00453512, \"locked\": 0 },\n \"fundsAfter\": { \"total\": 0.63294012, \"available\": 0.63294012, \"locked\": 0 },\n \"change\": { \"total\": 0.628405, \"available\": 0.628405, \"locked\": 0 }\n }",
"{\n \"historyId\": \"e7d19e0f-03b3-46a8-bc72-dde72cc24ead\",\n \"balance\": {\n \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n \"currency\": \"BTC\",\n \"type\": \"CRYPTO\",\n \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n \"name\": \"BTC\"\n },\n \"detailId\": null,\n \"time\": 1520706403868,\n \"type\": \"TRANSACTION_PRE_LOCKING\",\n \"value\": -0.1,\n \"fundsBefore\": { \"total\": 0.63294012, \"available\": 0.63294012, \"locked\": 0 },\n \"fundsAfter\": { \"total\": 0.63294012, \"available\": 0.53294012, \"locked\": 0.1 },\n \"change\": { \"total\": 0, \"available\": -0.1, \"locked\": 0.1 }\n }"
],
"line_end" => 1254,
"line_start" => 954,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "item"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (item, 'historyId')"
},
%{
"comment" => nil,
"key" => "direction",
"value" => "direction"
},
%{
"comment" => nil,
"key" => "account",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "referenceId",
"value" => "this.safeString (item, 'detailId')"
},
%{
"comment" => nil,
"key" => "referenceAccount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "this.parseLedgerEntryType (this.safeString (item, 'type'))"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "this.safeCurrencyCode (currencyId)"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.parseNumber (amount)"
},
%{
"comment" => nil,
"key" => "before",
"value" => "this.safeNumber (fundsBefore, 'total')"
},
%{
"comment" => nil,
"key" => "after",
"value" => "this.safeNumber (fundsAfter, 'total')"
},
%{
"comment" => nil,
"key" => "status",
"value" => "'ok'"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
}
],
"name" => "parseLedgerEntry",
"signature" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry",
"source" => "parseLedgerEntry (item: Dict, currency: Currency = undefined): LedgerEntry {\n //\n // FUNDS_MIGRATION\n // {\n // \"historyId\": \"84ea7a29-7da5-4de5-b0c0-871e83cad765\",\n // \"balance\": {\n // \"id\": \"821ec166-cb88-4521-916c-f4eb44db98df\",\n // \"currency\": \"LTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"LTC\"\n // },\n // \"detailId\": null,\n // \"time\": 1506128252968,\n // \"type\": \"FUNDS_MIGRATION\",\n // \"value\": 0.0009957,\n // \"fundsBefore\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n // \"fundsAfter\": { \"total\": 0.0009957, \"available\": 0.0009957, \"locked\": 0 },\n // \"change\": { \"total\": 0.0009957, \"available\": 0.0009957, \"locked\": 0 }\n // }\n //\n // CREATE_BALANCE\n // {\n // \"historyId\": \"d0fabd8d-9107-4b5e-b9a6-3cab8af70d49\",\n // \"balance\": {\n // \"id\": \"653ffcf2-3037-4ebe-8e13-d5ea1a01d60d\",\n // \"currency\": \"BTG\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTG\"\n // },\n // \"detailId\": null,\n // \"time\": 1508895244751,\n // \"type\": \"CREATE_BALANCE\",\n // \"value\": 0,\n // \"fundsBefore\": { \"total\": null, \"available\": null, \"locked\": null },\n // \"fundsAfter\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n // \"change\": { \"total\": 0, \"available\": 0, \"locked\": 0 }\n // }\n //\n // BITCOIN_GOLD_FORK\n // {\n // \"historyId\": \"2b4d52d3-611c-473d-b92c-8a8d87a24e41\",\n // \"balance\": {\n // \"id\": \"653ffcf2-3037-4ebe-8e13-d5ea1a01d60d\",\n // \"currency\": \"BTG\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTG\"\n // },\n // \"detailId\": null,\n // \"time\": 1508895244778,\n // \"type\": \"BITCOIN_GOLD_FORK\",\n // \"value\": 0.00453512,\n // \"fundsBefore\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n // \"fundsAfter\": { \"total\": 0.00453512, \"available\": 0.00453512, \"locked\": 0 },\n // \"change\": { \"total\": 0.00453512, \"available\": 0.00453512, \"locked\": 0 }\n // }\n //\n // ADD_FUNDS\n // {\n // \"historyId\": \"3158236d-dae5-4a5d-81af-c1fa4af340fb\",\n // \"balance\": {\n // \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTC\"\n // },\n // \"detailId\": \"8e83a960-e737-4380-b8bb-259d6e236faa\",\n // \"time\": 1520631178816,\n // \"type\": \"ADD_FUNDS\",\n // \"value\": 0.628405,\n // \"fundsBefore\": { \"total\": 0.00453512, \"available\": 0.00453512, \"locked\": 0 },\n // \"fundsAfter\": { \"total\": 0.63294012, \"available\": 0.63294012, \"locked\": 0 },\n // \"change\": { \"total\": 0.628405, \"available\": 0.628405, \"locked\": 0 }\n // }\n //\n // TRANSACTION_PRE_LOCKING\n // {\n // \"historyId\": \"e7d19e0f-03b3-46a8-bc72-dde72cc24ead\",\n // \"balance\": {\n // \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTC\"\n // },\n // \"detailId\": null,\n // \"time\": 1520706403868,\n // \"type\": \"TRANSACTION_PRE_LOCKING\",\n // \"value\": -0.1,\n // \"fundsBefore\": { \"total\": 0.63294012, \"available\": 0.63294012, \"locked\": 0 },\n // \"fundsAfter\": { \"total\": 0.63294012, \"available\": 0.53294012, \"locked\": 0.1 },\n // \"change\": { \"total\": 0, \"available\": -0.1, \"locked\": 0.1 }\n // }\n //\n // TRANSACTION_POST_OUTCOME\n // {\n // \"historyId\": \"c4010825-231d-4a9c-8e46-37cde1f7b63c\",\n // \"balance\": {\n // \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTC\"\n // },\n // \"detailId\": \"bf2876bc-b545-4503-96c8-ef4de8233876\",\n // \"time\": 1520706404032,\n // \"type\": \"TRANSACTION_POST_OUTCOME\",\n // \"value\": -0.01771415,\n // \"fundsBefore\": { \"total\": 0.63294012, \"available\": 0.53294012, \"locked\": 0.1 },\n // \"fundsAfter\": { \"total\": 0.61522597, \"available\": 0.53294012, \"locked\": 0.08228585 },\n // \"change\": { \"total\": -0.01771415, \"available\": 0, \"locked\": -0.01771415 }\n // }\n //\n // TRANSACTION_POST_INCOME\n // {\n // \"historyId\": \"7f18b7af-b676-4125-84fd-042e683046f6\",\n // \"balance\": {\n // \"id\": \"ab43023b-4079-414c-b340-056e3430a3af\",\n // \"currency\": \"EUR\",\n // \"type\": \"FIAT\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"EUR\"\n // },\n // \"detailId\": \"f5fcb274-0cc7-4385-b2d3-bae2756e701f\",\n // \"time\": 1520706404035,\n // \"type\": \"TRANSACTION_POST_INCOME\",\n // \"value\": 628.78,\n // \"fundsBefore\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n // \"fundsAfter\": { \"total\": 628.78, \"available\": 628.78, \"locked\": 0 },\n // \"change\": { \"total\": 628.78, \"available\": 628.78, \"locked\": 0 }\n // }\n //\n // TRANSACTION_COMMISSION_OUTCOME\n // {\n // \"historyId\": \"843177fa-61bc-4cbf-8be5-b029d856c93b\",\n // \"balance\": {\n // \"id\": \"ab43023b-4079-414c-b340-056e3430a3af\",\n // \"currency\": \"EUR\",\n // \"type\": \"FIAT\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"EUR\"\n // },\n // \"detailId\": \"f5fcb274-0cc7-4385-b2d3-bae2756e701f\",\n // \"time\": 1520706404050,\n // \"type\": \"TRANSACTION_COMMISSION_OUTCOME\",\n // \"value\": -2.71,\n // \"fundsBefore\": { \"total\": 766.06, \"available\": 766.06, \"locked\": 0 },\n // \"fundsAfter\": { \"total\": 763.35,\"available\": 763.35, \"locked\": 0 },\n // \"change\": { \"total\": -2.71, \"available\": -2.71, \"locked\": 0 }\n // }\n //\n // TRANSACTION_OFFER_COMPLETED_RETURN\n // {\n // \"historyId\": \"cac69b04-c518-4dc5-9d86-e76e91f2e1d2\",\n // \"balance\": {\n // \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTC\"\n // },\n // \"detailId\": null,\n // \"time\": 1520714886425,\n // \"type\": \"TRANSACTION_OFFER_COMPLETED_RETURN\",\n // \"value\": 0.00000196,\n // \"fundsBefore\": { \"total\": 0.00941208, \"available\": 0.00941012, \"locked\": 0.00000196 },\n // \"fundsAfter\": { \"total\": 0.00941208, \"available\": 0.00941208, \"locked\": 0 },\n // \"change\": { \"total\": 0, \"available\": 0.00000196, \"locked\": -0.00000196 }\n // }\n //\n // WITHDRAWAL_LOCK_FUNDS\n // {\n // \"historyId\": \"03de2271-66ab-4960-a786-87ab9551fc14\",\n // \"balance\": {\n // \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTC\"\n // },\n // \"detailId\": \"6ad3dc72-1d6d-4ec2-8436-ca43f85a38a6\",\n // \"time\": 1522245654481,\n // \"type\": \"WITHDRAWAL_LOCK_FUNDS\",\n // \"value\": -0.8,\n // \"fundsBefore\": { \"total\": 0.8, \"available\": 0.8, \"locked\": 0 },\n // \"fundsAfter\": { \"total\": 0.8, \"available\": 0, \"locked\": 0.8 },\n // \"change\": { \"total\": 0, \"available\": -0.8, \"locked\": 0.8 }\n // }\n //\n // WITHDRAWAL_SUBTRACT_FUNDS\n // {\n // \"historyId\": \"b0308c89-5288-438d-a306-c6448b1a266d\",\n // \"balance\": {\n // \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTC\"\n // },\n // \"detailId\": \"6ad3dc72-1d6d-4ec2-8436-ca43f85a38a6\",\n // \"time\": 1522246526186,\n // \"type\": \"WITHDRAWAL_SUBTRACT_FUNDS\",\n // \"value\": -0.8,\n // \"fundsBefore\": { \"total\": 0.8, \"available\": 0, \"locked\": 0.8 },\n // \"fundsAfter\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n // \"change\": { \"total\": -0.8, \"available\": 0, \"locked\": -0.8 }\n // }\n //\n // TRANSACTION_OFFER_ABORTED_RETURN\n // {\n // \"historyId\": \"b1a3c075-d403-4e05-8f32-40512cdd88c0\",\n // \"balance\": {\n // \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTC\"\n // },\n // \"detailId\": null,\n // \"time\": 1522512298662,\n // \"type\": \"TRANSACTION_OFFER_ABORTED_RETURN\",\n // \"value\": 0.0564931,\n // \"fundsBefore\": { \"total\": 0.44951311, \"available\": 0.39302001, \"locked\": 0.0564931 },\n // \"fundsAfter\": { \"total\": 0.44951311, \"available\": 0.44951311, \"locked\": 0 },\n // \"change\": { \"total\": 0, \"available\": 0.0564931, \"locked\": -0.0564931 }\n // }\n //\n // WITHDRAWAL_UNLOCK_FUNDS\n // {\n // \"historyId\": \"0ed569a2-c330-482e-bb89-4cb553fb5b11\",\n // \"balance\": {\n // \"id\": \"3a7e7a1e-0324-49d5-8f59-298505ebd6c7\",\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"BTC\"\n // },\n // \"detailId\": \"0c7be256-c336-4111-bee7-4eb22e339700\",\n // \"time\": 1527866360785,\n // \"type\": \"WITHDRAWAL_UNLOCK_FUNDS\",\n // \"value\": 0.05045,\n // \"fundsBefore\": { \"total\": 0.86001578, \"available\": 0.80956578, \"locked\": 0.05045 },\n // \"fundsAfter\": { \"total\": 0.86001578, \"available\": 0.86001578, \"locked\": 0 },\n // \"change\": { \"total\": 0, \"available\": 0.05045, \"locked\": -0.05045 }\n // }\n //\n // TRANSACTION_COMMISSION_RETURN\n // {\n // \"historyId\": \"07c89c27-46f1-4d7a-8518-b73798bf168a\",\n // \"balance\": {\n // \"id\": \"ab43023b-4079-414c-b340-056e3430a3af\",\n // \"currency\": \"EUR\",\n // \"type\": \"FIAT\",\n // \"userId\": \"a34d361d-7bad-49c1-888e-62473b75d877\",\n // \"name\": \"EUR\"\n // },\n // \"detailId\": null,\n // \"time\": 1528304043063,\n // \"type\": \"TRANSACTION_COMMISSION_RETURN\",\n // \"value\": 0.6,\n // \"fundsBefore\": { \"total\": 0, \"available\": 0, \"locked\": 0 },\n // \"fundsAfter\": { \"total\": 0.6, \"available\": 0.6, \"locked\": 0 },\n // \"change\": { \"total\": 0.6, \"available\": 0.6, \"locked\": 0 }\n // }\n //\n const timestamp = this.safeInteger (item, 'time');\n const balance = this.safeValue (item, 'balance', {});\n const currencyId = this.safeString (balance, 'currency');\n currency = this.safeCurrency (currencyId, currency);\n const change = this.safeValue (item, 'change', {});\n let amount = this.safeString (change, 'total');\n let direction = 'in';\n if (Precise.stringLt (amount, '0')) {\n direction = 'out';\n amount = Precise.stringNeg (amount);\n }\n // there are 2 undocumented api calls: (v1_01PrivateGetPaymentsDepositDetailId and v1_01PrivateGetPaymentsWithdrawalDetailId)\n // that can be used to enrich the transfers with txid, address etc (you need to use info.detailId as a parameter)\n const fundsBefore = this.safeValue (item, 'fundsBefore', {});\n const fundsAfter = this.safeValue (item, 'fundsAfter', {});\n return this.safeLedgerEntry ({\n 'info': item,\n 'id': this.safeString (item, 'historyId'),\n 'direction': direction,\n 'account': undefined,\n 'referenceId': this.safeString (item, 'detailId'),\n 'referenceAccount': undefined,\n 'type': this.parseLedgerEntryType (this.safeString (item, 'type')),\n 'currency': this.safeCurrencyCode (currencyId),\n 'amount': this.parseNumber (amount),\n 'before': this.safeNumber (fundsBefore, 'total'),\n 'after': this.safeNumber (fundsAfter, 'total'),\n 'status': 'ok',\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'fee': undefined,\n }, currency) as LedgerEntry;\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1274,
"line_start" => 1256,
"mappings" => [],
"name" => "parseLedgerEntryType",
"signature" => "parseLedgerEntryType (type)",
"source" => "parseLedgerEntryType (type) {\n const types: Dict = {\n 'ADD_FUNDS': 'transaction',\n 'BITCOIN_GOLD_FORK': 'transaction',\n 'CREATE_BALANCE': 'transaction',\n 'FUNDS_MIGRATION': 'transaction',\n 'WITHDRAWAL_LOCK_FUNDS': 'transaction',\n 'WITHDRAWAL_SUBTRACT_FUNDS': 'transaction',\n 'WITHDRAWAL_UNLOCK_FUNDS': 'transaction',\n 'TRANSACTION_COMMISSION_OUTCOME': 'fee',\n 'TRANSACTION_COMMISSION_RETURN': 'fee',\n 'TRANSACTION_OFFER_ABORTED_RETURN': 'trade',\n 'TRANSACTION_OFFER_COMPLETED_RETURN': 'trade',\n 'TRANSACTION_POST_INCOME': 'trade',\n 'TRANSACTION_POST_OUTCOME': 'trade',\n 'TRANSACTION_PRE_LOCKING': 'trade',\n };\n return this.safeString (types, type, type);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 503,
"line_start" => 437,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "base + '/' + quote"
},
%{
"comment" => nil,
"key" => "base",
"value" => "base"
},
%{
"comment" => nil,
"key" => "quote",
"value" => "quote"
},
%{
"comment" => nil,
"key" => "settle",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseId",
"value" => "baseId"
},
%{
"comment" => nil,
"key" => "quoteId",
"value" => "quoteId"
},
%{
"comment" => nil,
"key" => "settleId",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "'spot'"
},
%{
"comment" => nil,
"key" => "spot",
"value" => "true"
},
%{
"comment" => nil,
"key" => "margin",
"value" => "false"
},
%{
"comment" => nil,
"key" => "swap",
"value" => "false"
},
%{
"comment" => nil,
"key" => "future",
"value" => "false"
},
%{
"comment" => nil,
"key" => "option",
"value" => "false"
},
%{
"comment" => nil,
"key" => "active",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "contract",
"value" => "false"
},
%{
"comment" => nil,
"key" => "linear",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "inverse",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "taker",
"value" => "this.safeNumber (fees, 'taker')"
},
%{
"comment" => nil,
"key" => "maker",
"value" => "this.safeNumber (fees, 'maker')"
},
%{
"comment" => nil,
"key" => "contractSize",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "expiry",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "expiryDatetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "optionType",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "strike",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "precision",
"value" => "{\n 'amount': this.parseNumber (this.parsePrecision (this.safeString (first, 'scale'))),\n 'price': this.parseNumber (this.parsePrecision (this.safeString (second, 'scale'))),\n }"
},
%{
"comment" => nil,
"key" => "limits",
"value" => "{\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': this.safeNumber (first, 'minOffer'),\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n }"
},
%{
"comment" => nil,
"key" => "created",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "item"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.parseNumber (this.parsePrecision (this.safeString (first, 'scale')))"
},
%{
"comment" => nil,
"key" => "price",
"value" => "this.parseNumber (this.parsePrecision (this.safeString (second, 'scale')))"
},
%{
"comment" => nil,
"key" => "leverage",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "{\n 'min': this.safeNumber (first, 'minOffer'),\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "price",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "{\n 'min': undefined,\n 'max': undefined,\n }"
},
%{
"comment" => nil,
"key" => "min",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "max",
"value" => "undefined"
}
],
"name" => "parseMarket",
"signature" => "parseMarket (item): Market",
"source" => "parseMarket (item): Market {\n const market = this.safeValue (item, 'market', {});\n const id = this.safeString (market, 'code');\n const first = this.safeValue (market, 'first', {});\n const second = this.safeValue (market, 'second', {});\n const baseId = this.safeString (first, 'currency');\n const quoteId = this.safeString (second, 'currency');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n let fees = this.safeValue (this.fees, 'trading', {});\n const fiatCurrencies = this.safeValue (this.options, 'fiatCurrencies', []);\n if (this.inArray (base, fiatCurrencies) || this.inArray (quote, fiatCurrencies)) {\n fees = this.safeValue (this.fees, 'fiat', {});\n }\n // todo: check that the limits have ben interpreted correctly\n return {\n 'id': id,\n 'symbol': base + '/' + quote,\n 'base': base,\n 'quote': quote,\n 'settle': undefined,\n 'baseId': baseId,\n 'quoteId': quoteId,\n 'settleId': undefined,\n 'type': 'spot',\n 'spot': true,\n 'margin': false,\n 'swap': false,\n 'future': false,\n 'option': false,\n 'active': undefined,\n 'contract': false,\n 'linear': undefined,\n 'inverse': undefined,\n 'taker': this.safeNumber (fees, 'taker'),\n 'maker': this.safeNumber (fees, 'maker'),\n 'contractSize': undefined,\n 'expiry': undefined,\n 'expiryDatetime': undefined,\n 'optionType': undefined,\n 'strike': undefined,\n 'precision': {\n 'amount': this.parseNumber (this.parsePrecision (this.safeString (first, 'scale'))),\n 'price': this.parseNumber (this.parsePrecision (this.safeString (second, 'scale'))),\n },\n 'limits': {\n 'leverage': {\n 'min': undefined,\n 'max': undefined,\n },\n 'amount': {\n 'min': this.safeNumber (first, 'minOffer'),\n 'max': undefined,\n },\n 'price': {\n 'min': undefined,\n 'max': undefined,\n },\n 'cost': {\n 'min': undefined,\n 'max': undefined,\n },\n },\n 'created': undefined,\n 'info': item,\n };\n }"
},
%{
"comment" => nil,
"examples" => [
"[\n \"1582399800000\",\n {\n \"o\": \"0.0001428\",\n \"c\": \"0.0001428\",\n \"h\": \"0.0001428\",\n \"l\": \"0.0001428\",\n \"v\": \"4\",\n \"co\": \"1\"\n }\n ]"
],
"line_end" => 1299,
"line_start" => 1276,
"mappings" => [],
"name" => "parseOHLCV",
"signature" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV",
"source" => "parseOHLCV (ohlcv, market: Market = undefined): OHLCV {\n //\n // [\n // \"1582399800000\",\n // {\n // \"o\": \"0.0001428\",\n // \"c\": \"0.0001428\",\n // \"h\": \"0.0001428\",\n // \"l\": \"0.0001428\",\n // \"v\": \"4\",\n // \"co\": \"1\"\n // }\n // ]\n //\n const first = this.safeValue (ohlcv, 1, {});\n return [\n this.safeInteger (ohlcv, 0),\n this.safeNumber (first, 'o'),\n this.safeNumber (first, 'h'),\n this.safeNumber (first, 'l'),\n this.safeNumber (first, 'c'),\n this.safeNumber (first, 'v'),\n ];\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"market\": \"ETH-EUR\",\n \"offerType\": \"Sell\",\n \"id\": \"93d3657b-d616-11e9-9248-0242ac110005\",\n \"currentAmount\": \"0.04\",\n \"lockedAmount\": \"0.04\",\n \"rate\": \"280\",\n \"startAmount\": \"0.04\",\n \"time\": \"1568372806924\",\n \"postOnly\": false,\n \"hidden\": false,\n \"mode\": \"limit\",\n \"receivedAmount\": \"0.0\",\n \"firstBalanceId\": \"5b816c3e-437c-4e43-9bef-47814ae7ebfc\",\n \"secondBalanceId\": \"ab43023b-4079-414c-b340-056e3430a3af\"\n }",
"{\n status: \"Ok\",\n errors: []\n }"
],
"line_end" => 580,
"line_start" => 525,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (order, 'id')"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "lastTradeTimestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "status",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "this.safeString (order, 'mode')"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "postOnly"
},
%{
"comment" => nil,
"key" => "side",
"value" => "this.safeStringLower (order, 'offerType')"
},
%{
"comment" => nil,
"key" => "price",
"value" => "this.safeString (order, 'rate')"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remaining"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"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 // \"market\": \"ETH-EUR\",\n // \"offerType\": \"Sell\",\n // \"id\": \"93d3657b-d616-11e9-9248-0242ac110005\",\n // \"currentAmount\": \"0.04\",\n // \"lockedAmount\": \"0.04\",\n // \"rate\": \"280\",\n // \"startAmount\": \"0.04\",\n // \"time\": \"1568372806924\",\n // \"postOnly\": false,\n // \"hidden\": false,\n // \"mode\": \"limit\",\n // \"receivedAmount\": \"0.0\",\n // \"firstBalanceId\": \"5b816c3e-437c-4e43-9bef-47814ae7ebfc\",\n // \"secondBalanceId\": \"ab43023b-4079-414c-b340-056e3430a3af\"\n // }\n //\n // cancelOrder\n //\n // {\n // status: \"Ok\",\n // errors: []\n // }\n //\n const marketId = this.safeString (order, 'market');\n const symbol = this.safeSymbol (marketId, market, '-');\n const timestamp = this.safeInteger (order, 'time');\n const amount = this.safeString (order, 'startAmount');\n const remaining = this.safeString (order, 'currentAmount');\n const postOnly = this.safeValue (order, 'postOnly');\n return this.safeOrder ({\n 'id': this.safeString (order, 'id'),\n 'clientOrderId': undefined,\n 'info': order,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'status': undefined,\n 'symbol': symbol,\n 'type': this.safeString (order, 'mode'),\n 'timeInForce': undefined,\n 'postOnly': postOnly,\n 'side': this.safeStringLower (order, 'offerType'),\n 'price': this.safeString (order, 'rate'),\n 'triggerPrice': undefined,\n 'amount': amount,\n 'cost': undefined,\n 'filled': undefined,\n 'remaining': remaining,\n 'average': undefined,\n 'fee': undefined,\n 'trades': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"m\": \"ETH-PLN\",\n \"h\": \"13485.13\",\n \"l\": \"13100.01\",\n \"v\": \"126.10710939\",\n \"r24h\": \"13332.72\"\n }",
"{\n \"market\": {\n \"code\": \"ADA-USDT\",\n \"first\": {\n \"currency\": \"ADA\",\n \"minOffer\": \"0.2\",\n \"scale\": \"6\"\n },\n \"second\": {\n \"currency\": \"USDT\",\n \"minOffer\": \"0.099\",\n \"scale\": \"6\"\n },\n \"amountPrecision\": \"6\",\n \"pricePrecision\": \"6\",\n \"ratePrecision\": \"6\"\n },\n \"time\": \"1655812661202\",\n \"highestBid\": \"0.492\",\n \"lowestAsk\": \"0.499389\",\n \"rate\": \"0.50588\",\n \"previousRate\": \"0.504981\"\n }"
],
"line_end" => 775,
"line_start" => 710,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "this.safeSymbol (marketId, market)"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "high",
"value" => "this.safeString (ticker, 'h')"
},
%{
"comment" => nil,
"key" => "low",
"value" => "this.safeString (ticker, 'l')"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeNumber (ticker, 'highestBid')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeNumber (ticker, 'lowestAsk')"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "open",
"value" => "this.safeString (ticker, 'r24h')"
},
%{
"comment" => nil,
"key" => "close",
"value" => "rate"
},
%{
"comment" => nil,
"key" => "last",
"value" => "rate"
},
%{
"comment" => nil,
"key" => "previousClose",
"value" => "this.safeValue (ticker, 'previousRate')"
},
%{
"comment" => nil,
"key" => "change",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "this.safeString (ticker, 'v')"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "ticker"
}
],
"name" => "parseTicker",
"signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker",
"source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n //\n // version 1\n //\n // {\n // \"m\": \"ETH-PLN\",\n // \"h\": \"13485.13\",\n // \"l\": \"13100.01\",\n // \"v\": \"126.10710939\",\n // \"r24h\": \"13332.72\"\n // }\n //\n // version 2\n //\n // {\n // \"market\": {\n // \"code\": \"ADA-USDT\",\n // \"first\": {\n // \"currency\": \"ADA\",\n // \"minOffer\": \"0.2\",\n // \"scale\": \"6\"\n // },\n // \"second\": {\n // \"currency\": \"USDT\",\n // \"minOffer\": \"0.099\",\n // \"scale\": \"6\"\n // },\n // \"amountPrecision\": \"6\",\n // \"pricePrecision\": \"6\",\n // \"ratePrecision\": \"6\"\n // },\n // \"time\": \"1655812661202\",\n // \"highestBid\": \"0.492\",\n // \"lowestAsk\": \"0.499389\",\n // \"rate\": \"0.50588\",\n // \"previousRate\": \"0.504981\"\n // }\n //\n const tickerMarket = this.safeValue (ticker, 'market');\n const marketId = this.safeString2 (tickerMarket, 'code', 'm');\n market = this.safeMarket (marketId, market);\n const timestamp = this.safeInteger (ticker, 'time');\n const rate = this.safeValue (ticker, 'rate');\n return this.safeTicker ({\n 'symbol': this.safeSymbol (marketId, market),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'high': this.safeString (ticker, 'h'),\n 'low': this.safeString (ticker, 'l'),\n 'bid': this.safeNumber (ticker, 'highestBid'),\n 'bidVolume': undefined,\n 'ask': this.safeNumber (ticker, 'lowestAsk'),\n 'askVolume': undefined,\n 'vwap': undefined,\n 'open': this.safeString (ticker, 'r24h'),\n 'close': rate,\n 'last': rate,\n 'previousClose': this.safeValue (ticker, 'previousRate'),\n 'change': undefined,\n 'percentage': undefined,\n 'average': undefined,\n 'baseVolume': this.safeString (ticker, 'v'),\n 'quoteVolume': undefined,\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"rate\": \"0.02195928\",\n \"amount\": \"0.00167952\"\n }",
"{\n \"amount\": \"0.29285199\",\n \"commissionValue\": \"0.00125927\",\n \"id\": \"11c8203a-a267-11e9-b698-0242ac110007\",\n \"initializedBy\": \"Buy\",\n \"market\": \"ETH-EUR\",\n \"offerId\": \"11c82038-a267-11e9-b698-0242ac110007\",\n \"rate\": \"277\",\n \"time\": \"1562689917517\",\n \"userAction\": \"Buy\",\n \"wasTaker\": true,\n }",
"{\n \"id\": \"df00b0da-e5e0-11e9-8c19-0242ac11000a\",\n \"t\": \"1570108958831\",\n \"a\": \"0.04776653\",\n \"r\": \"0.02145854\",\n \"ty\": \"Sell\"\n }"
],
"line_end" => 1428,
"line_start" => 1352,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (trade, 'id')"
},
%{
"comment" => nil,
"key" => "order",
"value" => "order"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "priceString"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "takerOrMaker"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"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 // createOrder trades\n //\n // {\n // \"rate\": \"0.02195928\",\n // \"amount\": \"0.00167952\"\n // }\n //\n // fetchMyTrades (private)\n //\n // {\n // \"amount\": \"0.29285199\",\n // \"commissionValue\": \"0.00125927\",\n // \"id\": \"11c8203a-a267-11e9-b698-0242ac110007\",\n // \"initializedBy\": \"Buy\",\n // \"market\": \"ETH-EUR\",\n // \"offerId\": \"11c82038-a267-11e9-b698-0242ac110007\",\n // \"rate\": \"277\",\n // \"time\": \"1562689917517\",\n // \"userAction\": \"Buy\",\n // \"wasTaker\": true,\n // }\n //\n // fetchTrades (public)\n //\n // {\n // \"id\": \"df00b0da-e5e0-11e9-8c19-0242ac11000a\",\n // \"t\": \"1570108958831\",\n // \"a\": \"0.04776653\",\n // \"r\": \"0.02145854\",\n // \"ty\": \"Sell\"\n // }\n //\n const timestamp = this.safeInteger2 (trade, 'time', 't');\n const side = this.safeStringLower2 (trade, 'userAction', 'ty');\n const wasTaker = this.safeValue (trade, 'wasTaker');\n let takerOrMaker: Str = undefined;\n if (wasTaker !== undefined) {\n takerOrMaker = wasTaker ? 'taker' : 'maker';\n }\n const priceString = this.safeString2 (trade, 'rate', 'r');\n const amountString = this.safeString2 (trade, 'amount', 'a');\n const feeCostString = this.safeString (trade, 'commissionValue');\n const marketId = this.safeString (trade, 'market');\n market = this.safeMarket (marketId, market, '-');\n const symbol = market['symbol'];\n let fee = undefined;\n if (feeCostString !== undefined) {\n const feeCurrency = (side === 'buy') ? market['base'] : market['quote'];\n fee = {\n 'currency': feeCurrency,\n 'cost': feeCostString,\n };\n }\n const order = this.safeString (trade, 'offerId');\n // todo: check this logic\n let type: Str = undefined;\n if (order !== undefined) {\n type = order ? 'limit' : 'market';\n }\n return this.safeTrade ({\n 'id': this.safeString (trade, 'id'),\n 'order': order,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': symbol,\n 'type': type,\n 'side': side,\n 'price': priceString,\n 'amount': amountString,\n 'cost': undefined,\n 'takerOrMaker': takerOrMaker,\n 'fee': fee,\n 'info': trade,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": \"65e01087-afb0-4ab2-afdb-cc925e360296\"\n }"
],
"line_end" => 1908,
"line_start" => 1877,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (transaction, 'id')"
},
%{
"comment" => nil,
"key" => "txid",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "network",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "addressFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "type",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "currency['code']"
},
%{
"comment" => nil,
"key" => "status",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "updated",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagTo",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "comment",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "transaction"
}
],
"name" => "parseTransaction",
"signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction",
"source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // withdraw\n //\n // {\n // \"id\": \"65e01087-afb0-4ab2-afdb-cc925e360296\"\n // }\n //\n currency = this.safeCurrency (undefined, currency);\n return {\n 'id': this.safeString (transaction, 'id'),\n 'txid': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'network': undefined,\n 'addressFrom': undefined,\n 'address': undefined,\n 'addressTo': undefined,\n 'amount': undefined,\n 'type': undefined,\n 'currency': currency['code'],\n 'status': undefined,\n 'updated': undefined,\n 'tagFrom': undefined,\n 'tag': undefined,\n 'tagTo': undefined,\n 'comment': undefined,\n 'internal': undefined,\n 'fee': undefined,\n 'info': transaction,\n } as Transaction;\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"status\": \"Ok\",\n \"from\": {\n \"id\": \"ad9397c5-3bd9-4372-82ba-22da6a90cb56\",\n \"userId\": \"4bc43956-423f-47fd-9faa-acd37c58ed9f\",\n \"availableFunds\": 0.01803472,\n \"totalFunds\": 0.01804161,\n \"lockedFunds\": 0.00000689,\n \"currency\": \"BTC\",\n \"type\": \"CRYPTO\",\n \"name\": \"BTC\",\n \"balanceEngine\": \"BITBAY\"\n },\n \"to\": {\n \"id\": \"01931d52-536b-4ca5-a9f4-be28c86d0cc3\",\n \"userId\": \"4bc43956-423f-47fd-9faa-acd37c58ed9f\",\n \"availableFunds\": 0.0001,\n \"totalFunds\": 0.0001,\n \"lockedFunds\": 0,\n \"currency\": \"BTC\",\n \"type\": \"CRYPTO\",\n \"name\": \"Prowizja\",\n \"balanceEngine\": \"BITBAY\"\n },\n \"errors\": null\n }"
],
"line_end" => 1822,
"line_start" => 1776,
"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" => "this.safeCurrencyCode (currencyId, currency)"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fromAccount",
"value" => "fromId"
},
%{
"comment" => nil,
"key" => "toAccount",
"value" => "toId"
},
%{
"comment" => nil,
"key" => "status",
"value" => "this.parseTransferStatus (status)"
}
],
"name" => "parseTransfer",
"signature" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry",
"source" => "parseTransfer (transfer: Dict, currency: Currency = undefined): TransferEntry {\n //\n // {\n // \"status\": \"Ok\",\n // \"from\": {\n // \"id\": \"ad9397c5-3bd9-4372-82ba-22da6a90cb56\",\n // \"userId\": \"4bc43956-423f-47fd-9faa-acd37c58ed9f\",\n // \"availableFunds\": 0.01803472,\n // \"totalFunds\": 0.01804161,\n // \"lockedFunds\": 0.00000689,\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"name\": \"BTC\",\n // \"balanceEngine\": \"BITBAY\"\n // },\n // \"to\": {\n // \"id\": \"01931d52-536b-4ca5-a9f4-be28c86d0cc3\",\n // \"userId\": \"4bc43956-423f-47fd-9faa-acd37c58ed9f\",\n // \"availableFunds\": 0.0001,\n // \"totalFunds\": 0.0001,\n // \"lockedFunds\": 0,\n // \"currency\": \"BTC\",\n // \"type\": \"CRYPTO\",\n // \"name\": \"Prowizja\",\n // \"balanceEngine\": \"BITBAY\"\n // },\n // \"errors\": null\n // }\n //\n const status = this.safeString (transfer, 'status');\n const fromAccount = this.safeValue (transfer, 'from', {});\n const fromId = this.safeString (fromAccount, 'id');\n const to = this.safeValue (transfer, 'to', {});\n const toId = this.safeString (to, 'id');\n const currencyId = this.safeString (fromAccount, 'currency');\n return {\n 'info': transfer,\n 'id': undefined,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'currency': this.safeCurrencyCode (currencyId, currency),\n 'amount': undefined,\n 'fromAccount': fromId,\n 'toAccount': toId,\n 'status': this.parseTransferStatus (status),\n };\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1830,
"line_start" => 1824,
"mappings" => [],
"name" => "parseTransferStatus",
"signature" => "parseTransferStatus (status: Str): Str",
"source" => "parseTransferStatus (status: Str): Str {\n const statuses: Dict = {\n 'Ok': 'ok',\n 'Fail': 'failed',\n };\n return this.safeString (statuses, status, status);\n }"
}
],
path_prefix: "",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 1000,
period: 1000,
requests: 1,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [],
public: []
},
required_credentials: %{
api_key: true,
password: false,
secret: true,
uid: false
},
requires_eddsa: false,
response_error: nil,
signing: %{
api_key_header: "API-Key",
confidence: :medium,
pattern: :hmac_sha512_nonce,
signature_header: "API-Sign"
},
spec_format_version: 1,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{
"min" => 46.8
},
"cost" => %{},
"price" => %{}
},
sample_precision: %{
"amount" => 1.0e-8,
"price" => 0.01
},
spot: %{
base: "GRT",
base_id: "GRT",
case: :upper,
contract: false,
id: "GRT-PLN",
limits: %{
"amount" => %{
"min" => 46.8
},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
maker: 0.003,
precision: %{
"amount" => 1.0e-8,
"price" => 0.01
},
quote: "PLN",
quote_id: "PLN",
separator: "-",
symbol: "GRT/PLN",
taker: 0.0043
}
},
symbol_patterns: %{
spot: %{
case: :upper,
component_order: nil,
date_format: nil,
pattern: :dash_upper,
separator: "-",
suffix: nil
}
},
timeframes: %{
"12h" => "43200",
"15m" => "900",
"1d" => "86400",
"1h" => "3600",
"1m" => "60",
"1w" => "604800",
"2h" => "7200",
"30m" => "1800",
"3d" => "259200",
"3m" => "180",
"4h" => "14400",
"5m" => "300",
"6h" => "21600"
},
url_strategy: %{
detected_from: "fallback",
pattern: :no_prefix,
prefix: nil
},
urls: %{
api: "https://zondacrypto.exchange/API/Public",
api_sections: %{
"private" => "https://zondacrypto.exchange/API/Trading/tradingApi.php",
"public" => "https://zondacrypto.exchange/API/Public",
"v1_01Private" => "https://api.zondacrypto.exchange/rest",
"v1_01Public" => "https://api.zondacrypto.exchange/rest"
},
doc: [
"https://docs.zondacrypto.exchange/",
"https://github.com/BitBayNet/API"
],
other: %{
"support" => "https://zondaglobal.com/en/helpdesk/zonda-exchange"
},
sandbox: nil,
www: "https://zondaglobal.com"
},
version: nil,
ws: nil
}