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

priv/specs/extracted/latoken.exs

# Latoken Exchange Specification
#
# Auto-generated by: mix ccxt.extract latoken
# 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: [
"KY"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"BUX" => "Buxcoin",
"CBT" => "Community Business Token",
"CTC" => "CyberTronchain",
"DMD" => "Diamond Coin",
"FREN" => "Frenchie",
"GDX" => "GoldenX",
"GEC" => "Geco One",
"GEM" => "NFTmall",
"GMT" => "GMT Token",
"IMC" => "IMCoin",
"MT" => "Monarch",
"TPAY" => "Tetra Pay",
"TRADE" => "Smart Trade Coin",
"TSL" => "Treasure SL",
"UNO" => "Unobtanium",
"WAR" => "Warrior Token",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 23,
"coveragePercent" => 100,
"enabledMethods" => 26,
"excluded" => [
%{
"method" => "fetchDepositsWithdrawals",
"reason" => "latoken fetchDepositsWithdrawals() is not supported yet"
},
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchTransactions",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 3,
"extractableMethods" => 23,
"failures" => []
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"currency" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :post,
name: :cancel_all_orders,
param_mappings: %{},
params: [
:symbol
],
path: "/auth/order/cancelAll/{currency}/{quote}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :cancel_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/auth/order/cancel",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"baseCurrency" => "BTC",
"clientOrderId" => "<generated>",
"condition" => "GTC",
"quoteCurrency" => "USDT",
"timestamp" => "<generated>",
"type" => "LIMIT"
},
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"amount" => "quantity"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/auth/order/place",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"baseCurrency" => "BTC",
"clientOrderId" => "<generated>",
"condition" => "GTC",
"quoteCurrency" => "USDT",
"timestamp" => "<generated>",
"type" => "MARKET"
},
market_type: :spot,
method: :post,
name: :create_market_order,
param_mappings: %{
"amount" => "quantity"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/auth/order/place",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"baseCurrency" => "BTC",
"clientOrderId" => "<generated>",
"condition" => "GTC",
"quoteCurrency" => "USDT",
"timestamp" => "<generated>"
},
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"amount" => "quantity"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/auth/order/place",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"baseCurrency" => "BTC",
"clientOrderId" => "<generated>",
"condition" => "GTC",
"quoteCurrency" => "USDT",
"timestamp" => "<generated>",
"triggerDirection" => "below",
"type" => "LIMIT"
},
market_type: :swap,
method: :post,
name: :create_stop_limit_order,
param_mappings: %{
"amount" => "quantity",
"triggerPrice" => "stopPrice"
},
params: [
:symbol,
:side,
:amount,
:price,
:triggerPrice
],
path: "/auth/stopOrder/place",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"baseCurrency" => "BTC",
"clientOrderId" => "<generated>",
"condition" => "GTC",
"quoteCurrency" => "USDT",
"timestamp" => "<generated>",
"triggerDirection" => "below"
},
market_type: :swap,
method: :post,
name: :create_stop_order,
param_mappings: %{
"amount" => "quantity",
"triggerPrice" => "stopPrice"
},
params: [
:symbol,
:type,
:side,
:amount,
:price,
:triggerPrice
],
path: "/auth/stopOrder/place",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/auth/account",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_currencies,
param_mappings: %{},
params: [],
path: "/currency",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"currency" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/book/{currency}/{quote}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_markets,
param_mappings: %{},
params: [],
path: "/pair",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"currency" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :get,
name: :fetch_my_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/auth/trade/pair/{currency}/{quote}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"currency" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :get,
name: :fetch_open_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/auth/order/pair/{currency}/{quote}/active",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/auth/order/getOrder/{id}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"currency" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{},
params: [
:symbol,
:limit
],
path: "/book/{currency}/{quote}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"currency" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :get,
name: :fetch_orders,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/auth/order/pair/{currency}/{quote}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"base" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{},
params: [
:symbol
],
path: "/ticker/{base}/{quote}",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_tickers,
param_mappings: %{},
params: [
:symbols
],
path: "/ticker",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_time,
param_mappings: %{},
params: [],
path: "/time",
response_transformer: {:extract_path, ["serverTime"]},
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1,
default_params: %{
"currency" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{},
params: [
:symbol,
:since,
:limit
],
path: "/trade/history/{currency}/{quote}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
default_params: %{
"currency" => "BTC",
"quote" => "USDT"
},
market_type: :spot,
method: :get,
name: :fetch_trading_fee,
param_mappings: %{},
params: [
:symbol
],
path: "/auth/trade/fee/{currency}/{quote}",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :get,
name: :fetch_transfers,
param_mappings: %{},
params: [
:code,
:since,
:limit
],
path: "/auth/transfer",
response_transformer: {:extract_path, ["content"]},
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1,
market_type: :spot,
method: :post,
name: :transfer,
param_mappings: %{
"amount" => "value",
"code" => "currency",
"toAccount" => "recipient"
},
params: [
:code,
:amount,
:fromAccount,
:toAccount
],
path: "/auth/transfer/phone",
source: :intercepted
}
],
error_code_details: %{
"ACCESS_DENIED" => %{
description: "access is denied. Probably you don't have enough access rights, you contact our support.",
type: :access_restricted
},
"ACCOUNT_EXPIRED" => %{
description: "restore your account or create a new one.",
type: :access_restricted
},
"API keys are not available for" => %{
description: "API keys are not available for FROZEN user",
type: :access_restricted
},
"BAD_CREDENTIALS" => %{
description: "invalid username or password.",
type: :invalid_credentials
},
"BAD_REQUEST" => %{
description: "some bad request, for example bad fields values or something else. Read response message for more information.",
type: :invalid_parameters
},
"BAD_TICKS" => %{
description: "Quantity (1.4) does not match quantity tick (10)",
type: :invalid_order
},
"COOKIE_THEFT" => %{
description: "cookie has been stolen. Let's try reset your cookies.",
type: :invalid_credentials
},
"CREDENTIALS_EXPIRED" => %{
description: "credentials expired.",
type: :access_restricted
},
"Can't find currency with tag" => %{
description: "Can't find currency with tag = undefined",
type: :invalid_order
},
"FORBIDDEN" => %{
description: "you don't have enough access rights.",
type: :access_restricted
},
"For input string" => %{
description: "Internal error",
type: :invalid_parameters
},
"HTTP_MEDIA_TYPE_NOT_SUPPORTED" => %{
description: "http media type not supported.",
type: :invalid_parameters
},
"INSUFFICIENT_AUTHENTICATION" => %{
description: "for example, 2FA required.",
type: :invalid_credentials
},
"INSUFFICIENT_FUNDS" => %{
description: "not enough balance on the spot account for currency (USDT), need (20.000)",
type: :insufficient_balance
},
"INTERNAL_ERROR" => %{
description: "internal server error. You can contact our support to solve this problem. {\"message\":\"Internal Server Error\",\"error\":\"INTERNAL_ERROR\",\"status\":\"FAILURE\"}",
type: :exchange_error
},
"MEDIA_TYPE_NOT_ACCEPTABLE" => %{
description: "media type not acceptable",
type: :invalid_parameters
},
"METHOD_ARGUMENT_NOT_VALID" => %{
description: "one of method argument is invalid. Check argument types and error message for more information.",
type: :invalid_parameters
},
"NOT_AUTHORIZED" => %{
description: "user's query not authorized. Check if you are logged in.",
type: :invalid_credentials
},
"NOT_FOUND" => %{
description: "entity not found. Read message for more information.",
type: :exchange_error
},
"ORDER_VALIDATION" => %{
description: "Quantity (0) is not positive",
type: :invalid_order
},
"REQUEST_REJECTED" => %{
description: "user's request rejected for some reasons. Check error message.",
type: :exchange_error
},
"SERVICE_UNAVAILABLE" => %{
description: "requested information currently not available. You can contact our support to solve this problem or retry later.",
type: :network_error
},
"TOO_MANY_REQUESTS" => %{
description: "too many requests at the time. A response header X-Rate-Limit-Remaining indicates the number of allowed request per a period.",
type: :rate_limited
},
"The API key was revoked" => %{
description: "The API key was revoked",
type: :invalid_credentials
},
"UNKNOWN_LOCATION" => %{
description: "user logged from unusual location, email confirmation required.",
type: :invalid_credentials
},
"Unable to place order because pair is in inactive state" => %{
description: "Unable to place order because pair is in inactive state (PAIR_STATUS_INACTIVE)",
type: :invalid_order
},
"Unable to resolve currency by tag" => %{
description: "Unable to resolve currency by tag (undefined)",
type: :invalid_order
},
"VALIDATION_ERROR" => %{
description: "check errors field to get reasons.",
type: :invalid_parameters
},
"invalid API key, signature or digest" => %{
description: "invalid API key, signature or digest",
type: :invalid_credentials
},
"request expired or bad" => %{
description: "request expired or bad <timeAlive>/<timestamp> format",
type: :invalid_credentials
}
},
error_codes: %{
"ACCESS_DENIED" => :access_restricted,
"ACCOUNT_EXPIRED" => :access_restricted,
"API keys are not available for" => :access_restricted,
"BAD_CREDENTIALS" => :invalid_credentials,
"BAD_REQUEST" => :invalid_parameters,
"BAD_TICKS" => :invalid_order,
"COOKIE_THEFT" => :invalid_credentials,
"CREDENTIALS_EXPIRED" => :access_restricted,
"Can't find currency with tag" => :invalid_order,
"FORBIDDEN" => :access_restricted,
"For input string" => :invalid_parameters,
"HTTP_MEDIA_TYPE_NOT_SUPPORTED" => :invalid_parameters,
"INSUFFICIENT_AUTHENTICATION" => :invalid_credentials,
"INSUFFICIENT_FUNDS" => :insufficient_balance,
"INTERNAL_ERROR" => :exchange_error,
"MEDIA_TYPE_NOT_ACCEPTABLE" => :invalid_parameters,
"METHOD_ARGUMENT_NOT_VALID" => :invalid_parameters,
"NOT_AUTHORIZED" => :invalid_credentials,
"NOT_FOUND" => :exchange_error,
"ORDER_VALIDATION" => :invalid_order,
"REQUEST_REJECTED" => :exchange_error,
"SERVICE_UNAVAILABLE" => :network_error,
"TOO_MANY_REQUESTS" => :rate_limited,
"The API key was revoked" => :invalid_credentials,
"UNKNOWN_LOCATION" => :invalid_credentials,
"Unable to place order because pair is in inactive state" => :invalid_order,
"Unable to resolve currency by tag" => :invalid_order,
"VALIDATION_ERROR" => :invalid_parameters,
"invalid API key, signature or digest" => :invalid_credentials,
"request expired or bad" => :invalid_credentials
},
exceptions: %{
broad: %{
"API keys are not available for" => :account_suspended,
"Can't find currency with tag" => :bad_symbol,
"For input string" => :bad_request,
"The API key was revoked" => :authentication_error,
"Unable to place order because pair is in inactive state" => :bad_symbol,
"Unable to resolve currency by tag" => :bad_symbol,
"invalid API key, signature or digest" => :authentication_error,
"request expired or bad" => :invalid_nonce
},
exact: %{
"ACCESS_DENIED" => :permission_denied,
"ACCOUNT_EXPIRED" => :account_suspended,
"BAD_CREDENTIALS" => :authentication_error,
"BAD_REQUEST" => :bad_request,
"BAD_TICKS" => :invalid_order,
"COOKIE_THEFT" => :authentication_error,
"CREDENTIALS_EXPIRED" => :account_suspended,
"FORBIDDEN" => :permission_denied,
"HTTP_MEDIA_TYPE_NOT_SUPPORTED" => :bad_request,
"INSUFFICIENT_AUTHENTICATION" => :authentication_error,
"INSUFFICIENT_FUNDS" => :insufficient_funds,
"INTERNAL_ERROR" => :exchange_error,
"MEDIA_TYPE_NOT_ACCEPTABLE" => :bad_request,
"METHOD_ARGUMENT_NOT_VALID" => :bad_request,
"NOT_AUTHORIZED" => :authentication_error,
"NOT_FOUND" => :exchange_error,
"ORDER_VALIDATION" => :invalid_order,
"REQUEST_REJECTED" => :exchange_error,
"SERVICE_UNAVAILABLE" => :exchange_not_available,
"TOO_MANY_REQUESTS" => :rate_limit_exceeded,
"UNKNOWN_LOCATION" => :authentication_error,
"VALIDATION_ERROR" => :bad_request
}
},
exchange_options: %{
"accounts" => %{
"ACCOUNT_TYPE_SPOT" => "spot",
"ACCOUNT_TYPE_WALLET" => "wallet"
},
"adjustForTimeDifference" => true,
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"defaultType" => "spot",
"fetchTradingFee" => %{
"method" => "fetchPrivateTradingFee"
},
"networksById" => %{},
"timeDifference" => 0,
"types" => %{
"funding" => "ACCOUNT_TYPE_WALLET",
"spot" => "ACCOUNT_TYPE_SPOT",
"wallet" => "ACCOUNT_TYPE_WALLET"
}
},
extended_metadata: %{
fees_url: "https://latoken.com/fees",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://user-images.githubusercontent.com/1294454/61511972-24c39f00-aa01-11e9-9f7c-471f1d6e5214.jpg",
referral_url: "https://latoken.com/invite?r=mvgp2djk"
},
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: false
},
trailing: false,
trigger_direction: false,
trigger_price: true
},
fetch_closed_orders: %{
days_back: 100000,
days_back_canceled: 1,
limit: 1000,
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: true
},
fetch_my_trades: %{
days_back: 100000,
limit: 1000,
margin_mode: false,
symbol_required: false
},
fetch_open_orders: %{
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: true
},
sandbox: false
},
swap: %{}
},
fees: %{
trading: %{
fee_side: "get",
maker: 0.0049,
percentage: true,
taker: 0.0049,
tier_based: false
}
},
handle_content_type_application_zip: nil,
handle_errors_source: "handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n if (!response) {\n return undefined;\n }\n //\n // {\"result\":false,\"message\":\"invalid API key, signature or digest\",\"error\":\"BAD_REQUEST\",\"status\":\"FAILURE\"}\n // {\"result\":false,\"message\":\"request expired or bad <timeAlive>/<timestamp> format\",\"error\":\"BAD_REQUEST\",\"status\":\"FAILURE\"}\n // {\"message\":\"Internal Server Error\",\"error\":\"INTERNAL_ERROR\",\"status\":\"FAILURE\"}\n // {\"result\":false,\"message\":\"Internal error\",\"error\":\"For input string: \\\"NaN\\\"\",\"status\":\"FAILURE\"}\n //\n const message = this.safeString(response, 'message');\n const feedback = this.id + ' ' + body;\n if (message !== undefined) {\n this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);\n }\n const error = this.safeValue(response, 'error');\n const errorMessage = this.safeString(error, 'message');\n if ((error !== undefined) || (errorMessage !== undefined)) {\n this.throwExactlyMatchedException(this.exceptions['exact'], error, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], body, 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: 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: true,
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: 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_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: true,
fetch_currencies_ws: true,
fetch_deposit: false,
fetch_deposit_address: false,
fetch_deposit_addresses: false,
fetch_deposit_addresses_by_network: false,
fetch_deposit_withdraw_fee: false,
fetch_deposit_withdraw_fees: false,
fetch_deposits: false,
fetch_deposits_withdrawals: true,
fetch_deposits_ws: false,
fetch_funding_history: false,
fetch_funding_interval: false,
fetch_funding_intervals: false,
fetch_funding_rate: false,
fetch_funding_rate_history: false,
fetch_funding_rates: false,
fetch_greeks: false,
fetch_index_ohlcv: false,
fetch_isolated_borrow_rate: false,
fetch_isolated_borrow_rates: false,
fetch_isolated_positions: false,
fetch_l2_order_book: true,
fetch_l3_order_book: false,
fetch_last_prices: false,
fetch_ledger: false,
fetch_ledger_entry: false,
fetch_leverage: false,
fetch_leverage_tiers: false,
fetch_leverages: false,
fetch_liquidations: false,
fetch_long_short_ratio: false,
fetch_long_short_ratio_history: false,
fetch_margin_adjustment_history: false,
fetch_margin_mode: false,
fetch_margin_modes: false,
fetch_mark_ohlcv: false,
fetch_mark_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: false,
fetch_ohlcv_ws: false,
fetch_open_interest: false,
fetch_open_interest_history: false,
fetch_open_interests: false,
fetch_open_order: false,
fetch_open_orders: true,
fetch_open_orders_ws: false,
fetch_option: false,
fetch_option_chain: false,
fetch_order: true,
fetch_order_book: true,
fetch_order_book_ws: false,
fetch_order_books: false,
fetch_order_trades: false,
fetch_order_with_client_order_id: false,
fetch_order_ws: false,
fetch_orders: true,
fetch_orders_by_status: false,
fetch_orders_ws: false,
fetch_position: false,
fetch_position_history: false,
fetch_position_mode: false,
fetch_position_ws: false,
fetch_positions: false,
fetch_positions_for_symbol: false,
fetch_positions_for_symbol_ws: false,
fetch_positions_history: false,
fetch_positions_risk: false,
fetch_positions_ws: false,
fetch_premium_index_ohlcv: false,
fetch_settlement_history: false,
fetch_status: false,
fetch_ticker: true,
fetch_ticker_ws: false,
fetch_tickers: true,
fetch_tickers_ws: false,
fetch_time: true,
fetch_trades: true,
fetch_trades_ws: false,
fetch_trading_fee: true,
fetch_trading_fees: false,
fetch_trading_fees_ws: false,
fetch_trading_limits: false,
fetch_transaction_fee: false,
fetch_transaction_fees: false,
fetch_transactions: true,
fetch_transfer: false,
fetch_transfers: true,
fetch_underlying_assets: false,
fetch_volatility_history: false,
fetch_withdraw_addresses: false,
fetch_withdrawal: false,
fetch_withdrawal_whitelist: false,
fetch_withdrawals: false,
fetch_withdrawals_ws: false,
future: false,
margin: false,
option: false,
private_api: true,
public_api: true,
reduce_margin: false,
repay_cross_margin: false,
repay_isolated_margin: false,
sandbox: false,
set_leverage: false,
set_margin: false,
set_margin_mode: false,
set_position_mode: false,
sign_in: false,
spot: true,
swap: false,
transfer: 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: false,
ws: false
},
http_config: nil,
id: "latoken",
markets: nil,
name: "Latoken",
ohlcv_timestamp_resolution: :unknown,
options: %{
"accounts" => %{
"ACCOUNT_TYPE_SPOT" => "spot",
"ACCOUNT_TYPE_WALLET" => "wallet"
},
:adjust_for_time_difference => true,
:default_account_type => "spot",
:default_type => "spot",
"fetch_trading_fee" => %{
"method" => "fetchPrivateTradingFee"
},
:time_difference => 0,
"types" => %{
"funding" => "ACCOUNT_TYPE_WALLET",
"spot" => "ACCOUNT_TYPE_SPOT",
"wallet" => "ACCOUNT_TYPE_WALLET"
}
},
order_mappings: %{
side_format: :uppercase,
side_key: "side",
type_format: :uppercase,
type_key: "type"
},
param_mappings: %{
"amount" => "value",
"code" => "currency",
"toAccount" => "recipient",
"triggerPrice" => "stopPrice"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [
"{\n \"baseCurrency\": \"f7dac554-8139-4ff6-841f-0e586a5984a0\",\n \"quoteCurrency\": \"a5a7a7a9-e2a3-43f9-8754-29a02f6b709b\",\n \"side\": \"BID\",\n \"clientOrderId\": \"my-wonderful-order-number-71566\",\n \"price\": \"10103.19\",\n \"stopPrice\": \"10103.19\",\n \"quantity\": \"3.21\",\n \"timestamp\": 1568185507\n }",
"{\n \"id\":\"a76bd262-3560-4bfb-98ac-1cedd394f4fc\",\n \"status\":\"ORDER_STATUS_PLACED\",\n \"side\":\"ORDER_SIDE_BUY\",\n \"condition\":\"ORDER_CONDITION_GOOD_TILL_CANCELLED\",\n \"type\":\"ORDER_TYPE_LIMIT\",\n \"baseCurrency\":\"620f2019-33c0-423b-8a9d-cde4d7f8ef7f\",\n \"quoteCurrency\":\"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n \"clientOrderId\":\"web-macos_chrome_1a6a6659-6f7c-4fac-be0b-d1d7ac06d\",\n \"price\":\"4000.00\",\n \"quantity\":\"0.01\",\n \"cost\":\"40.000000000000000000\",\n \"filled\":\"0\",\n \"trader\":\"7244bb3a-b6b2-446a-ac78-fa4bce5b59a9\",\n \"creator\":\"ORDER_CREATOR_USER\",\n \"creatorId\":\"\",\n \"timestamp\":1635920767648\n }",
"{\n \"message\":\"cancellation request successfully submitted\",\n \"status\":\"SUCCESS\",\n \"id\":\"a631426d-3543-45ba-941e-75f7825afb0f\"\n }"
],
"line_end" => 1169,
"line_start" => 1066,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "clientOrderId"
},
%{
"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" => "status"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "timeInForce",
"value" => "timeInForce"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "this.safeString (order, 'stopPrice')"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "cost"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "filled"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "remaining",
"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 // createOrder\n //\n // {\n // \"baseCurrency\": \"f7dac554-8139-4ff6-841f-0e586a5984a0\",\n // \"quoteCurrency\": \"a5a7a7a9-e2a3-43f9-8754-29a02f6b709b\",\n // \"side\": \"BID\",\n // \"clientOrderId\": \"my-wonderful-order-number-71566\",\n // \"price\": \"10103.19\",\n // \"stopPrice\": \"10103.19\",\n // \"quantity\": \"3.21\",\n // \"timestamp\": 1568185507\n // }\n //\n // fetchOrder, fetchOpenOrders, fetchOrders\n //\n // {\n // \"id\":\"a76bd262-3560-4bfb-98ac-1cedd394f4fc\",\n // \"status\":\"ORDER_STATUS_PLACED\",\n // \"side\":\"ORDER_SIDE_BUY\",\n // \"condition\":\"ORDER_CONDITION_GOOD_TILL_CANCELLED\",\n // \"type\":\"ORDER_TYPE_LIMIT\",\n // \"baseCurrency\":\"620f2019-33c0-423b-8a9d-cde4d7f8ef7f\",\n // \"quoteCurrency\":\"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n // \"clientOrderId\":\"web-macos_chrome_1a6a6659-6f7c-4fac-be0b-d1d7ac06d\",\n // \"price\":\"4000.00\",\n // \"quantity\":\"0.01\",\n // \"cost\":\"40.000000000000000000\",\n // \"filled\":\"0\",\n // \"trader\":\"7244bb3a-b6b2-446a-ac78-fa4bce5b59a9\",\n // \"creator\":\"ORDER_CREATOR_USER\",\n // \"creatorId\":\"\",\n // \"timestamp\":1635920767648\n // }\n //\n // cancelOrder\n //\n // {\n // \"message\":\"cancellation request successfully submitted\",\n // \"status\":\"SUCCESS\",\n // \"id\":\"a631426d-3543-45ba-941e-75f7825afb0f\"\n // }\n //\n const id = this.safeString (order, 'id');\n const timestamp = this.safeInteger (order, 'timestamp');\n const baseId = this.safeString (order, 'baseCurrency');\n const quoteId = this.safeString (order, 'quoteCurrency');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n let symbol = undefined;\n if ((base !== undefined) && (quote !== undefined)) {\n symbol = base + '/' + quote;\n if (symbol in this.markets) {\n market = this.market (symbol);\n }\n }\n const orderSide = this.safeString (order, 'side');\n let side = undefined;\n if (orderSide !== undefined) {\n const parts = orderSide.split ('_');\n const partsLength = parts.length;\n side = this.safeStringLower (parts, partsLength - 1);\n }\n const type = this.parseOrderType (this.safeString (order, 'type'));\n const price = this.safeString (order, 'price');\n const amount = this.safeString (order, 'quantity');\n const filled = this.safeString (order, 'filled');\n const cost = this.safeString (order, 'cost');\n let status = this.parseOrderStatus (this.safeString (order, 'status'));\n const message = this.safeString (order, 'message');\n if (message !== undefined) {\n if (message.indexOf ('cancel') >= 0) {\n status = 'canceled';\n } else if (message.indexOf ('accept') >= 0) {\n status = 'open';\n }\n }\n const clientOrderId = this.safeString (order, 'clientOrderId');\n const timeInForce = this.parseTimeInForce (this.safeString (order, 'condition'));\n return this.safeOrder ({\n 'id': id,\n 'clientOrderId': clientOrderId,\n 'info': order,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'status': status,\n 'symbol': symbol,\n 'type': type,\n 'timeInForce': timeInForce,\n 'postOnly': undefined,\n 'side': side,\n 'price': price,\n 'triggerPrice': this.safeString (order, 'stopPrice'),\n 'cost': cost,\n 'amount': amount,\n 'filled': filled,\n 'average': undefined,\n 'remaining': undefined,\n 'fee': undefined,\n 'trades': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1047,
"line_start" => 1040,
"mappings" => [],
"name" => "parseOrderStatus",
"signature" => "parseOrderStatus (status: Str)",
"source" => "parseOrderStatus (status: Str) {\n const statuses: Dict = {\n 'ORDER_STATUS_PLACED': 'open',\n 'ORDER_STATUS_CLOSED': 'closed',\n 'ORDER_STATUS_CANCELLED': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1055,
"line_start" => 1049,
"mappings" => [],
"name" => "parseOrderType",
"signature" => "parseOrderType (status)",
"source" => "parseOrderType (status) {\n const statuses: Dict = {\n 'ORDER_TYPE_MARKET': 'market',\n 'ORDER_TYPE_LIMIT': 'limit',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"symbol\": \"92151d82-df98-4d88-9a4d-284fa9eca49f/0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n \"baseCurrency\": \"92151d82-df98-4d88-9a4d-284fa9eca49f\",\n \"quoteCurrency\": \"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n \"volume24h\": \"165723597.189022176000000000\",\n \"volume7d\": \"934505768.625109571000000000\",\n \"change24h\": \"0.0200\",\n \"change7d\": \"-6.4200\",\n \"amount24h\": \"6438.457663100000000000\",\n \"amount7d\": \"35657.785013800000000000\",\n \"lastPrice\": \"25779.16\",\n \"lastQuantity\": \"0.248403300000000000\",\n \"bestBid\": \"25778.74\",\n \"bestBidQuantity\": \"0.6520232\",\n \"bestAsk\": \"25779.17\",\n \"bestAskQuantity\": \"0.4956043\",\n \"updateTimestamp\": \"1693965231406\"\n }"
],
"line_end" => 711,
"line_start" => 665,
"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" => "low",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "high",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeString (ticker, 'bestBid')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "this.safeString (ticker, 'bestBidQuantity')"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeString (ticker, 'bestAsk')"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "this.safeString (ticker, 'bestAskQuantity')"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "open",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "close",
"value" => "last"
},
%{
"comment" => nil,
"key" => "last",
"value" => "last"
},
%{
"comment" => nil,
"key" => "previousClose",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "change",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "this.safeString (ticker, 'change24h')"
},
%{
"comment" => nil,
"key" => "average",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "this.safeString (ticker, 'amount24h')"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "this.safeString (ticker, 'volume24h')"
},
%{
"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 // {\n // \"symbol\": \"92151d82-df98-4d88-9a4d-284fa9eca49f/0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n // \"baseCurrency\": \"92151d82-df98-4d88-9a4d-284fa9eca49f\",\n // \"quoteCurrency\": \"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n // \"volume24h\": \"165723597.189022176000000000\",\n // \"volume7d\": \"934505768.625109571000000000\",\n // \"change24h\": \"0.0200\",\n // \"change7d\": \"-6.4200\",\n // \"amount24h\": \"6438.457663100000000000\",\n // \"amount7d\": \"35657.785013800000000000\",\n // \"lastPrice\": \"25779.16\",\n // \"lastQuantity\": \"0.248403300000000000\",\n // \"bestBid\": \"25778.74\",\n // \"bestBidQuantity\": \"0.6520232\",\n // \"bestAsk\": \"25779.17\",\n // \"bestAskQuantity\": \"0.4956043\",\n // \"updateTimestamp\": \"1693965231406\"\n // }\n //\n const marketId = this.safeString (ticker, 'symbol');\n const last = this.safeString (ticker, 'lastPrice');\n const timestamp = this.safeIntegerOmitZero (ticker, 'updateTimestamp'); // sometimes latoken provided '0' ts from /ticker endpoint\n return this.safeTicker ({\n 'symbol': this.safeSymbol (marketId, market),\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'low': undefined,\n 'high': undefined,\n 'bid': this.safeString (ticker, 'bestBid'),\n 'bidVolume': this.safeString (ticker, 'bestBidQuantity'),\n 'ask': this.safeString (ticker, 'bestAsk'),\n 'askVolume': this.safeString (ticker, 'bestAskQuantity'),\n 'vwap': undefined,\n 'open': undefined,\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': this.safeString (ticker, 'change24h'),\n 'average': undefined,\n 'baseVolume': this.safeString (ticker, 'amount24h'),\n 'quoteVolume': this.safeString (ticker, 'volume24h'),\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1064,
"line_start" => 1057,
"mappings" => [],
"name" => "parseTimeInForce",
"signature" => "parseTimeInForce (timeInForce: Str)",
"source" => "parseTimeInForce (timeInForce: Str) {\n const timeInForces: Dict = {\n 'ORDER_CONDITION_GOOD_TILL_CANCELLED': 'GTC',\n 'ORDER_CONDITION_IMMEDIATE_OR_CANCEL': 'IOC',\n 'ORDER_CONDITION_FILL_OR_KILL': 'FOK',\n };\n return this.safeString (timeInForces, timeInForce, timeInForce);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\":\"c152f814-8eeb-44f0-8f3f-e5c568f2ffcf\",\n \"isMakerBuyer\":false,\n \"baseCurrency\":\"620f2019-33c0-423b-8a9d-cde4d7f8ef7f\",\n \"quoteCurrency\":\"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n \"price\":\"4435.56\",\n \"quantity\":\"0.32534\",\n \"cost\":\"1443.0650904\",\n \"timestamp\":1635854642725,\n \"makerBuyer\":false\n }",
"{\n \"id\":\"02e02533-b4bf-4ba9-9271-24e2108dfbf7\",\n \"isMakerBuyer\":false,\n \"direction\":\"TRADE_DIRECTION_BUY\",\n \"baseCurrency\":\"620f2019-33c0-423b-8a9d-cde4d7f8ef7f\",\n \"quoteCurrency\":\"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n \"price\":\"4564.32\",\n \"quantity\":\"0.01000\",\n \"cost\":\"45.6432\",\n \"fee\":\"0.223651680000000000\",\n \"order\":\"c9cac6a0-484c-4892-88e7-ad51b39f2ce1\",\n \"timestamp\":1635921580399,\n \"makerBuyer\":false\n }"
],
"line_end" => 874,
"line_start" => 790,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "order",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "type",
"value" => "type"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "takerOrMaker"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "priceString"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amountString"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "costString"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
}
],
"name" => "parseTrade",
"signature" => "parseTrade (trade: Dict, market: Market = undefined): Trade",
"source" => "parseTrade (trade: Dict, market: Market = undefined): Trade {\n //\n // fetchTrades (public)\n //\n // {\n // \"id\":\"c152f814-8eeb-44f0-8f3f-e5c568f2ffcf\",\n // \"isMakerBuyer\":false,\n // \"baseCurrency\":\"620f2019-33c0-423b-8a9d-cde4d7f8ef7f\",\n // \"quoteCurrency\":\"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n // \"price\":\"4435.56\",\n // \"quantity\":\"0.32534\",\n // \"cost\":\"1443.0650904\",\n // \"timestamp\":1635854642725,\n // \"makerBuyer\":false\n // }\n //\n // fetchMyTrades (private)\n //\n // {\n // \"id\":\"02e02533-b4bf-4ba9-9271-24e2108dfbf7\",\n // \"isMakerBuyer\":false,\n // \"direction\":\"TRADE_DIRECTION_BUY\",\n // \"baseCurrency\":\"620f2019-33c0-423b-8a9d-cde4d7f8ef7f\",\n // \"quoteCurrency\":\"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n // \"price\":\"4564.32\",\n // \"quantity\":\"0.01000\",\n // \"cost\":\"45.6432\",\n // \"fee\":\"0.223651680000000000\",\n // \"order\":\"c9cac6a0-484c-4892-88e7-ad51b39f2ce1\",\n // \"timestamp\":1635921580399,\n // \"makerBuyer\":false\n // }\n //\n const type = undefined;\n const timestamp = this.safeInteger (trade, 'timestamp');\n const priceString = this.safeString (trade, 'price');\n const amountString = this.safeString (trade, 'quantity');\n const costString = this.safeString (trade, 'cost');\n const makerBuyer = this.safeValue (trade, 'makerBuyer');\n let side = this.safeString (trade, 'direction');\n if (side === undefined) {\n side = makerBuyer ? 'sell' : 'buy';\n } else {\n if (side === 'TRADE_DIRECTION_BUY') {\n side = 'buy';\n } else if (side === 'TRADE_DIRECTION_SELL') {\n side = 'sell';\n }\n }\n const isBuy = (side === 'buy');\n const takerOrMaker = (makerBuyer && isBuy) ? 'maker' : 'taker';\n const baseId = this.safeString (trade, 'baseCurrency');\n const quoteId = this.safeString (trade, 'quoteCurrency');\n const base = this.safeCurrencyCode (baseId);\n const quote = this.safeCurrencyCode (quoteId);\n const symbol = base + '/' + quote;\n if (symbol in this.markets) {\n market = this.market (symbol);\n }\n const id = this.safeString (trade, 'id');\n const orderId = this.safeString (trade, 'order');\n const feeCost = this.safeString (trade, 'fee');\n let fee = undefined;\n if (feeCost !== undefined) {\n fee = {\n 'cost': feeCost,\n 'currency': quote,\n };\n }\n return this.safeTrade ({\n 'info': trade,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': symbol,\n 'id': id,\n 'order': orderId,\n 'type': type,\n 'takerOrMaker': takerOrMaker,\n 'side': side,\n 'price': priceString,\n 'amount': amountString,\n 'cost': costString,\n 'fee': fee,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\":\"fbf7d0d1-2629-4ad8-9def-7a1dba423362\",\n \"status\":\"TRANSACTION_STATUS_CONFIRMED\",\n \"type\":\"TRANSACTION_TYPE_DEPOSIT\",\n \"senderAddress\":\"\",\n \"recipientAddress\":\"0x3c46fa2e3f9023bc4897828ed173f8ecb3a554bc\",\n \"amount\":\"200.000000000000000000\",\n \"transactionFee\":\"0.000000000000000000\",\n \"timestamp\":1635893208404,\n \"transactionHash\":\"0x28bad3b74a042df13d64ddfbca855566a51bf7f190b8cd565c236a18d5cd493f#42\",\n \"blockHeight\":13540262,\n \"currency\":\"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n \"memo\":null,\n \"paymentProvider\":\"a8d6d1cb-f84a-4e9d-aa82-c6a08b356ee1\",\n \"requiresCode\":false\n }"
],
"line_end" => 1611,
"line_start" => 1549,
"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" => "addressFrom"
},
%{
"comment" => nil,
"key" => "addressTo",
"value" => "addressTo"
},
%{
"comment" => nil,
"key" => "address",
"value" => "addressTo"
},
%{
"comment" => nil,
"key" => "tagFrom",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "tagTo",
"value" => "tagTo"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "tagTo"
},
%{
"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" => "undefined"
},
%{
"comment" => nil,
"key" => "comment",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "internal",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "fee"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "rate",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "feeCost"
}
],
"name" => "parseTransaction",
"signature" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction",
"source" => "parseTransaction (transaction: Dict, currency: Currency = undefined): Transaction {\n //\n // {\n // \"id\":\"fbf7d0d1-2629-4ad8-9def-7a1dba423362\",\n // \"status\":\"TRANSACTION_STATUS_CONFIRMED\",\n // \"type\":\"TRANSACTION_TYPE_DEPOSIT\",\n // \"senderAddress\":\"\",\n // \"recipientAddress\":\"0x3c46fa2e3f9023bc4897828ed173f8ecb3a554bc\",\n // \"amount\":\"200.000000000000000000\",\n // \"transactionFee\":\"0.000000000000000000\",\n // \"timestamp\":1635893208404,\n // \"transactionHash\":\"0x28bad3b74a042df13d64ddfbca855566a51bf7f190b8cd565c236a18d5cd493f#42\",\n // \"blockHeight\":13540262,\n // \"currency\":\"0c3a106d-bde3-4c13-a26e-3fd2394529e5\",\n // \"memo\":null,\n // \"paymentProvider\":\"a8d6d1cb-f84a-4e9d-aa82-c6a08b356ee1\",\n // \"requiresCode\":false\n // }\n //\n const id = this.safeString (transaction, 'id');\n const timestamp = this.safeInteger (transaction, 'timestamp');\n const currencyId = this.safeString (transaction, 'currency');\n const code = this.safeCurrencyCode (currencyId, currency);\n const status = this.parseTransactionStatus (this.safeString (transaction, 'status'));\n const amount = this.safeNumber (transaction, 'amount');\n const addressFrom = this.safeString (transaction, 'senderAddress');\n const addressTo = this.safeString (transaction, 'recipientAddress');\n const txid = this.safeString (transaction, 'transactionHash');\n const tagTo = this.safeString (transaction, 'memo');\n const fee = {\n 'currency': undefined,\n 'cost': undefined,\n 'rate': undefined,\n };\n const feeCost = this.safeNumber (transaction, 'transactionFee');\n if (feeCost !== undefined) {\n fee['cost'] = feeCost;\n fee['currency'] = code;\n }\n const type = this.parseTransactionType (this.safeString (transaction, 'type'));\n return {\n 'info': transaction,\n 'id': id,\n 'txid': txid,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'network': undefined,\n 'addressFrom': addressFrom,\n 'addressTo': addressTo,\n 'address': addressTo,\n 'tagFrom': undefined,\n 'tagTo': tagTo,\n 'tag': tagTo,\n 'type': type,\n 'amount': amount,\n 'currency': code,\n 'status': status,\n 'updated': undefined,\n 'comment': undefined,\n 'internal': undefined,\n 'fee': fee,\n };\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1623,
"line_start" => 1613,
"mappings" => [],
"name" => "parseTransactionStatus",
"signature" => "parseTransactionStatus (status: Str)",
"source" => "parseTransactionStatus (status: Str) {\n const statuses: Dict = {\n 'TRANSACTION_STATUS_CONFIRMED': 'ok',\n 'TRANSACTION_STATUS_EXECUTED': 'ok',\n 'TRANSACTION_STATUS_CHECKING': 'pending',\n 'TRANSACTION_STATUS_CANCELLED': 'canceled',\n 'TRANSACTION_STATUS_FAILED': 'failed',\n 'TRANSACTION_STATUS_REJECTED': 'rejected',\n };\n return this.safeString (statuses, status, status);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1631,
"line_start" => 1625,
"mappings" => [],
"name" => "parseTransactionType",
"signature" => "parseTransactionType (type)",
"source" => "parseTransactionType (type) {\n const types: Dict = {\n 'TRANSACTION_TYPE_DEPOSIT': 'deposit',\n 'TRANSACTION_TYPE_WITHDRAWAL': 'withdrawal',\n };\n return this.safeString (types, type, type);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"id\": \"e6fc4ace-7750-44e4-b7e9-6af038ac7107\",\n \"status\": \"TRANSFER_STATUS_COMPLETED\",\n \"type\": \"TRANSFER_TYPE_DEPOSIT_SPOT\",\n \"fromAccount\": \"3bf61015-bf32-47a6-b237-c9f70df772ad\",\n \"toAccount\": \"355eb279-7c7e-4515-814a-575a49dc0325\",\n \"transferringFunds\": \"500000.000000000000000000\",\n \"usdValue\": \"0.000000000000000000\",\n \"rejectReason\": \"\",\n \"timestamp\": 1576844438402,\n \"direction\": \"INTERNAL\",\n \"method\": \"TRANSFER_METHOD_UNKNOWN\",\n \"recipient\": \"\",\n \"sender\": \"\",\n \"currency\": \"40af7879-a8cc-4576-a42d-7d2749821b58\",\n \"codeRequired\": false,\n \"fromUser\": \"cd555555-666d-46fb-9ae6-487f66738073\",\n \"toUser\": \"cd555555-666d-46fb-9ae6-487f66738073\",\n \"fee\": 0\n }"
],
"line_end" => 1775,
"line_start" => 1738,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "transfer"
},
%{
"comment" => nil,
"key" => "id",
"value" => "this.safeString (transfer, 'id')"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "this.safeInteger (transfer, 'timestamp')"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "this.safeCurrencyCode (currencyId, currency)"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "this.safeNumber (transfer, 'transferringFunds')"
},
%{
"comment" => nil,
"key" => "fromAccount",
"value" => "this.safeString (transfer, 'fromAccount')"
},
%{
"comment" => nil,
"key" => "toAccount",
"value" => "this.safeString (transfer, 'toAccount')"
},
%{
"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 // \"id\": \"e6fc4ace-7750-44e4-b7e9-6af038ac7107\",\n // \"status\": \"TRANSFER_STATUS_COMPLETED\",\n // \"type\": \"TRANSFER_TYPE_DEPOSIT_SPOT\",\n // \"fromAccount\": \"3bf61015-bf32-47a6-b237-c9f70df772ad\",\n // \"toAccount\": \"355eb279-7c7e-4515-814a-575a49dc0325\",\n // \"transferringFunds\": \"500000.000000000000000000\",\n // \"usdValue\": \"0.000000000000000000\",\n // \"rejectReason\": \"\",\n // \"timestamp\": 1576844438402,\n // \"direction\": \"INTERNAL\",\n // \"method\": \"TRANSFER_METHOD_UNKNOWN\",\n // \"recipient\": \"\",\n // \"sender\": \"\",\n // \"currency\": \"40af7879-a8cc-4576-a42d-7d2749821b58\",\n // \"codeRequired\": false,\n // \"fromUser\": \"cd555555-666d-46fb-9ae6-487f66738073\",\n // \"toUser\": \"cd555555-666d-46fb-9ae6-487f66738073\",\n // \"fee\": 0\n // }\n //\n const timestamp = this.safeTimestamp (transfer, 'timestamp');\n const currencyId = this.safeString (transfer, 'currency');\n const status = this.safeString (transfer, 'status');\n return {\n 'info': transfer,\n 'id': this.safeString (transfer, 'id'),\n 'timestamp': this.safeInteger (transfer, 'timestamp'),\n 'datetime': this.iso8601 (timestamp),\n 'currency': this.safeCurrencyCode (currencyId, currency),\n 'amount': this.safeNumber (transfer, 'transferringFunds'),\n 'fromAccount': this.safeString (transfer, 'fromAccount'),\n 'toAccount': this.safeString (transfer, 'toAccount'),\n 'status': this.parseTransferStatus (status),\n };\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 1786,
"line_start" => 1777,
"mappings" => [],
"name" => "parseTransferStatus",
"signature" => "parseTransferStatus (status: Str): Str",
"source" => "parseTransferStatus (status: Str): Str {\n const statuses: Dict = {\n 'TRANSFER_STATUS_COMPLETED': 'ok',\n 'TRANSFER_STATUS_PENDING': 'pending',\n 'TRANSFER_STATUS_REJECTED': 'failed',\n 'TRANSFER_STATUS_UNVERIFIED': 'pending',\n 'TRANSFER_STATUS_CANCELLED': 'canceled',\n };\n return this.safeString (statuses, status, status);\n }"
}
],
path_prefix: "/v2/",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 1000,
period: 1000,
requests: 1,
rolling_window_size: 60000
},
raw_endpoints: %{
private: [
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/account"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/account/currency/{currency}/{type}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/order"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/order/getOrder/{id}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/order/pair/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/order/pair/{currency}/{quote}/active"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/stopOrder"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/stopOrder/getOrder/{id}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/stopOrder/pair/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/stopOrder/pair/{currency}/{quote}/active"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/trade"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/trade/fee/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/trade/pair/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/transaction"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/transaction/bindings"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/transaction/bindings/{currency}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/transaction/{id}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/auth/transfer"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/order/cancel"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/order/cancelAll"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/order/cancelAll/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/order/place"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/spot/deposit"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/spot/withdraw"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/stopOrder/cancel"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/stopOrder/cancelAll"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/stopOrder/cancelAll/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/stopOrder/place"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/transaction/depositAddress"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/transaction/withdraw"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/transaction/withdraw/cancel"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/transaction/withdraw/confirm"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/transaction/withdraw/resendCode"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/transfer/email"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/transfer/id"
},
%{
auth: false,
cost: 1,
method: :post,
path: "/auth/transfer/phone"
}
],
public: [
%{
auth: false,
cost: 1,
method: :get,
path: "/book/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/chart/week"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/chart/week/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/currency"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/currency/available"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/currency/quotes"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/currency/{currency}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/pair"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/pair/available"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/ticker"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/ticker/{base}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/time"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/trade/fee/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/trade/feeLevels"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/trade/history/{currency}/{quote}"
},
%{
auth: false,
cost: 1,
method: :get,
path: "/transaction/bindings"
}
]
},
required_credentials: %{
api_key: true,
password: false,
secret: true,
uid: false
},
requires_eddsa: false,
response_error: %{
code_field: [
"error",
"code"
],
field: "error",
message_field: [
"error",
"message"
],
success_values: nil,
type: :error_present
},
signing: %{
api_key_header: "X-LA-APIKEY",
confidence: :medium,
pattern: :hmac_sha512_nonce,
signature_header: "X-LA-SIGNATURE"
},
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" => 0
},
"cost" => %{},
"price" => %{}
},
sample_precision: %{
"amount" => 0.01,
"price" => 1.0e-8
},
spot: %{
base: "UPI",
base_id: "ccefc15a-6640-42ce-81e5-c04c0b5d9a47",
case: :lower,
contract: false,
id: "c0735f2d-d3c2-4bfe-801e-3e05253db01e",
limits: %{
"amount" => %{
"min" => 0
},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
maker: 0.0049,
precision: %{
"amount" => 0.01,
"price" => 1.0e-8
},
quote: "USDT",
quote_id: "0c3a106d-bde3-4c13-a26e-3fd2394529e5",
separator: "-",
symbol: "UPI/USDT",
taker: 0.0049
}
},
symbol_patterns: %{
spot: %{
case: :lower,
component_order: nil,
date_format: nil,
pattern: :dash_lower,
separator: "-",
suffix: nil
}
},
timeframes: %{},
url_strategy: %{
detected_from: "sign_method",
pattern: :version_slash,
prefix: "/v2/"
},
urls: %{
api: "https://api.latoken.com",
api_sections: %{
"rest" => "https://api.latoken.com"
},
doc: [
"https://api.latoken.com"
],
other: nil,
sandbox: nil,
www: "https://latoken.com"
},
version: "v2",
ws: nil
}