Current section
Files
Jump to
Current section
Files
priv/specs/extracted/bit2c.exs
# Bit2C Exchange Specification
#
# Auto-generated by: mix ccxt.extract bit2c
# 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: [
"IL"
],
currencies: %{},
currency_aliases: %{
"BCHSV" => "BSV",
"XBT" => "BTC"
},
dex: false,
enable_rate_limit: true,
endpoint_extraction_stats: %{
"capturedMethods" => 14,
"coveragePercent" => 100,
"enabledMethods" => 17,
"excluded" => [
%{
"method" => "editOrder",
"reason" => "emulated (returns cached data, no HTTP call)"
},
%{
"method" => "fetchCurrencies",
"reason" => "emulated (returns cached data, no HTTP call)"
}
],
"excludedMethods" => 2,
"extractableMethods" => 15,
"failures" => [
%{
"error" => "Cannot convert undefined or null to object",
"method" => "fetchMarkets"
}
]
},
endpoints: [
%{
api_section: "private",
auth: true,
cost: 1.0,
market_type: :spot,
method: :post,
name: :cancel_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/Order/CancelOrder",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
default_params: %{
"IsBid" => true,
"Total" => 50
},
market_type: :spot,
method: :post,
name: :create_limit_order,
param_mappings: %{
"amount" => "Amount",
"price" => "Price",
"symbol" => "Pair"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/Order/AddOrder",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
market_type: :spot,
method: :post,
name: :create_market_order,
param_mappings: %{
"amount" => "Amount",
"symbol" => "Pair"
},
params: [
:symbol,
:side,
:amount,
:price
],
path: "/Order/AddOrderMarketPriceBuy",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
default_params: %{
"IsBid" => true,
"Total" => 50
},
market_type: :spot,
method: :post,
name: :create_order,
param_mappings: %{
"amount" => "Amount",
"price" => "Price",
"symbol" => "Pair"
},
params: [
:symbol,
:type,
:side,
:amount,
:price
],
path: "/Order/AddOrder",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_balance,
param_mappings: %{},
params: [],
path: "/Account/Balance/v2",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
market_type: :spot,
method: :post,
name: :fetch_deposit_address,
param_mappings: %{
"code" => "Coin"
},
params: [
:code
],
path: "/Funds/AddCoinFundsRequest",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_l2_order_book,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:limit
],
path: "/Exchanges/{pair}/orderbook",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_my_trades,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/Order/OrderHistory",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_open_orders,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/Order/MyOrders",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_order,
param_mappings: %{},
params: [
:id,
:symbol
],
path: "/Order/GetById",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_order_book,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol,
:limit
],
path: "/Exchanges/{pair}/orderbook",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_ticker,
param_mappings: %{
"symbol" => "pair"
},
params: [
:symbol
],
path: "/Exchanges/{pair}/Ticker",
source: :intercepted
},
%{
api_section: "public",
auth: false,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_trades,
param_mappings: %{
"since" => "date",
"symbol" => "pair"
},
params: [
:symbol,
:since,
:limit
],
path: "/Exchanges/{pair}/trades",
source: :intercepted
},
%{
api_section: "private",
auth: true,
cost: 1.0,
market_type: :spot,
method: :get,
name: :fetch_trading_fees,
param_mappings: %{},
params: [],
path: "/Account/Balance",
source: :intercepted
}
],
error_code_details: %{
"No order found." => %{
description: "{ \"Error\" : \"No order found.\" }",
type: :order_not_found
},
"Please provide valid APIkey" => %{
description: "{ \"error\" : \"Please provide valid APIkey\" }",
type: :invalid_credentials
},
"Please provide valid nonce" => %{
description: nil,
type: :invalid_credentials
},
"please approve new terms of use on site" => %{
description: "{ \"error\" : \"please approve new terms of use on site.\" }",
type: :access_restricted
}
},
error_codes: %{
"No order found." => :order_not_found,
"Please provide valid APIkey" => :invalid_credentials,
"Please provide valid nonce" => :invalid_credentials,
"please approve new terms of use on site" => :access_restricted
},
exceptions: %{
broad: %{
"Please provide valid nonce" => :invalid_nonce,
"please approve new terms of use on site" => :permission_denied
},
exact: %{
"No order found." => :order_not_found,
"Please provide valid APIkey" => :authentication_error
}
},
exchange_options: %{
"defaultNetworkCodeReplacements" => %{
"BRC20" => %{
"BRC20" => "BTC"
},
"CRO" => %{
"CRC20" => "CRONOS"
},
"ETH" => %{
"ERC20" => "ETH"
},
"TRX" => %{
"TRC20" => "TRX"
}
},
"fetchTradesMethod" => "public_get_exchanges_pair_trades",
"networksById" => %{}
},
extended_metadata: %{
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
logo_url: "https://github.com/user-attachments/assets/db0bce50-6842-4c09-a1d5-0c87d22118aa",
referral_url: "https://bit2c.co.il/Aff/63bfed10-e359-420c-ab5a-ad368dab0baf"
},
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: false,
market_buy_requires_price: false,
self_trade_prevention: false,
stop_loss_price: false,
take_profit_price: false,
time_in_force: %{
fok: false,
gtd: false,
ioc: false,
po: false
},
trailing: false,
trigger_direction: false,
trigger_price: false
},
fetch_my_trades: %{
days_back: 30,
limit: 100,
margin_mode: false,
symbol_required: false,
until_days: 30
},
fetch_open_orders: %{
margin_mode: false,
symbol_required: true,
trailing: false,
trigger: false
},
fetch_order: %{
margin_mode: false,
symbol_required: false,
trailing: false,
trigger: false
},
sandbox: false
},
swap: %{}
},
fees: %{
trading: %{
maker: 0.025,
percentage: true,
taker: 0.03,
tier_based: true,
tiers: %{
maker: [
%{
fee: 0.025,
volume: 0
},
%{
fee: 0.0225,
volume: 20000
},
%{
fee: 0.02,
volume: 50000
},
%{
fee: 0.0175,
volume: 75000
},
%{
fee: 0.015,
volume: 100000
},
%{
fee: 0.01,
volume: 250000
},
%{
fee: 0.0075,
volume: 500000
},
%{
fee: 0.005,
volume: 750000
},
%{
fee: 0.004,
volume: 1000000
},
%{
fee: 0.003,
volume: 2000000
},
%{
fee: 0.002,
volume: 3000000
},
%{
fee: 0.001,
volume: 4000000
}
],
taker: [
%{
fee: 0.03,
volume: 0
},
%{
fee: 0.0275,
volume: 20000
},
%{
fee: 0.025,
volume: 50000
},
%{
fee: 0.0225,
volume: 75000
},
%{
fee: 0.02,
volume: 100000
},
%{
fee: 0.015,
volume: 250000
},
%{
fee: 0.0125,
volume: 500000
},
%{
fee: 0.01,
volume: 750000
},
%{
fee: 0.008,
volume: 1000000
},
%{
fee: 0.006,
volume: 2000000
},
%{
fee: 0.004,
volume: 3000000
},
%{
fee: 0.002,
volume: 4000000
}
]
}
}
},
handle_content_type_application_zip: nil,
handle_errors_source: "handleErrors(httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) {\n if (response === undefined) {\n return undefined; // fallback to default error handler\n }\n //\n // { \"error\" : \"please approve new terms of use on site.\" }\n // { \"error\": \"Please provide valid nonce in Request Nonce (1598218490) is not bigger than last nonce (1598218490).\"}\n // { \"Error\" : \"No order found.\" }\n //\n let error = this.safeString(response, 'error');\n if (error === undefined) {\n error = this.safeString(response, 'Error');\n }\n if (error !== undefined) {\n const feedback = this.id + ' ' + body;\n this.throwExactlyMatchedException(this.exceptions['exact'], error, feedback);\n this.throwBroadlyMatchedException(this.exceptions['broad'], error, 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: 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_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: true,
fetch_deposit_addresses: false,
fetch_deposit_addresses_by_network: false,
fetch_deposit_withdraw_fee: false,
fetch_deposit_withdraw_fees: false,
fetch_deposits: false,
fetch_deposits_withdrawals: false,
fetch_deposits_ws: false,
fetch_funding_history: false,
fetch_funding_interval: false,
fetch_funding_intervals: false,
fetch_funding_rate: false,
fetch_funding_rate_history: false,
fetch_funding_rates: false,
fetch_greeks: false,
fetch_index_ohlcv: false,
fetch_isolated_borrow_rate: false,
fetch_isolated_borrow_rates: false,
fetch_isolated_positions: false,
fetch_l2_order_book: true,
fetch_l3_order_book: false,
fetch_last_prices: false,
fetch_ledger: false,
fetch_ledger_entry: false,
fetch_leverage: false,
fetch_leverage_tiers: false,
fetch_leverages: false,
fetch_liquidations: false,
fetch_long_short_ratio: false,
fetch_long_short_ratio_history: false,
fetch_margin_adjustment_history: false,
fetch_margin_mode: false,
fetch_margin_modes: false,
fetch_mark_ohlcv: false,
fetch_mark_prices: false,
fetch_market_leverage_tiers: false,
fetch_markets: true,
fetch_markets_ws: false,
fetch_my_liquidations: false,
fetch_my_settlement_history: false,
fetch_my_trades: true,
fetch_my_trades_ws: false,
fetch_ohlcv: 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: 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: false,
fetch_tickers_ws: false,
fetch_time: false,
fetch_trades: true,
fetch_trades_ws: false,
fetch_trading_fee: false,
fetch_trading_fees: true,
fetch_trading_fees_ws: false,
fetch_trading_limits: false,
fetch_transaction_fee: false,
fetch_transaction_fees: false,
fetch_transactions: false,
fetch_transfer: false,
fetch_transfers: false,
fetch_underlying_assets: false,
fetch_volatility_history: false,
fetch_withdraw_addresses: false,
fetch_withdrawal: false,
fetch_withdrawal_whitelist: false,
fetch_withdrawals: false,
fetch_withdrawals_ws: false,
future: false,
margin: false,
option: false,
private_api: true,
public_api: true,
reduce_margin: false,
repay_cross_margin: false,
repay_isolated_margin: false,
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: false,
un_watch_my_trades: false,
un_watch_ohlcv: false,
un_watch_ohlcv_for_symbols: false,
un_watch_order_book: false,
un_watch_order_book_for_symbols: false,
un_watch_orders: false,
un_watch_positions: false,
un_watch_ticker: false,
un_watch_tickers: false,
un_watch_trades: false,
un_watch_trades_for_symbols: false,
watch_balance: false,
watch_bids_asks: false,
watch_liquidations: false,
watch_liquidations_for_symbols: false,
watch_my_liquidations: false,
watch_my_liquidations_for_symbols: false,
watch_my_trades: false,
watch_ohlcv: false,
watch_ohlcv_for_symbols: false,
watch_order_book: false,
watch_order_book_for_symbols: false,
watch_orders: false,
watch_orders_for_symbols: false,
watch_position: false,
watch_positions: false,
watch_status: false,
watch_ticker: false,
watch_tickers: false,
watch_trades: false,
watch_trades_for_symbols: false,
withdraw: false,
ws: false
},
http_config: nil,
id: "bit2c",
markets: %{
"BTC/NIS" => %{
"base" => "BTC",
"baseId" => "Btc",
"contract" => false,
"future" => false,
"id" => "BtcNis",
"index" => false,
"limits" => %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
"marginModes" => %{},
"option" => false,
"precision" => %{},
"quote" => "NIS",
"quoteId" => "Nis",
"spot" => true,
"swap" => false,
"symbol" => "BTC/NIS",
"type" => "spot"
},
"ETH/NIS" => %{
"base" => "ETH",
"baseId" => "Eth",
"contract" => false,
"future" => false,
"id" => "EthNis",
"index" => false,
"limits" => %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
"marginModes" => %{},
"option" => false,
"precision" => %{},
"quote" => "NIS",
"quoteId" => "Nis",
"spot" => true,
"swap" => false,
"symbol" => "ETH/NIS",
"type" => "spot"
},
"LTC/NIS" => %{
"base" => "LTC",
"baseId" => "Ltc",
"contract" => false,
"future" => false,
"id" => "LtcNis",
"index" => false,
"limits" => %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
"marginModes" => %{},
"option" => false,
"precision" => %{},
"quote" => "NIS",
"quoteId" => "Nis",
"spot" => true,
"swap" => false,
"symbol" => "LTC/NIS",
"type" => "spot"
},
"USDC/NIS" => %{
"base" => "USDC",
"baseId" => "Usdc",
"contract" => false,
"future" => false,
"id" => "UsdcNis",
"index" => false,
"limits" => %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
"marginModes" => %{},
"option" => false,
"precision" => %{},
"quote" => "NIS",
"quoteId" => "Nis",
"spot" => true,
"swap" => false,
"symbol" => "USDC/NIS",
"type" => "spot"
}
},
name: "Bit2C",
ohlcv_timestamp_resolution: :unknown,
options: %{
fetch_trades_method: "public_get_exchanges_pair_trades"
},
order_mappings: nil,
param_mappings: %{
"amount" => "Amount",
"code" => "Coin",
"price" => "Price",
"since" => "date",
"symbol" => "pair"
},
parse_methods: [
%{
"comment" => nil,
"examples" => [],
"line_end" => 306,
"line_start" => 287,
"mappings" => [],
"name" => "parseBalance",
"signature" => "parseBalance (response): Balances",
"source" => "parseBalance (response): Balances {\n const result: Dict = {\n 'info': response,\n 'timestamp': undefined,\n 'datetime': undefined,\n };\n const codes = Object.keys (this.currencies);\n for (let i = 0; i < codes.length; i++) {\n const code = codes[i];\n const account = this.account ();\n const currency = this.currency (code);\n const uppercase = currency['id'].toUpperCase ();\n if (uppercase in response) {\n account['free'] = this.safeString (response, 'AVAILABLE_' + uppercase);\n account['total'] = this.safeString (response, uppercase);\n }\n result[code] = account;\n }\n return this.safeBalance (result);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"address\": \"0xf14b94518d74aff2b1a6d3429471bcfcd3881d42\",\n \"hasTx\": False\n }"
],
"line_end" => 980,
"line_start" => 963,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "depositAddress"
},
%{
"comment" => nil,
"key" => "currency",
"value" => "code"
},
%{
"comment" => nil,
"key" => "network",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "address",
"value" => "address"
},
%{
"comment" => nil,
"key" => "tag",
"value" => "undefined"
}
],
"name" => "parseDepositAddress",
"signature" => "parseDepositAddress (depositAddress, currency: Currency = undefined): DepositAddress",
"source" => "parseDepositAddress (depositAddress, currency: Currency = undefined): DepositAddress {\n //\n // {\n // \"address\": \"0xf14b94518d74aff2b1a6d3429471bcfcd3881d42\",\n // \"hasTx\": False\n // }\n //\n const address = this.safeString (depositAddress, 'address');\n this.checkAddress (address);\n const code = this.safeCurrencyCode (undefined, currency);\n return {\n 'info': depositAddress,\n 'currency': code,\n 'network': undefined,\n 'address': address,\n 'tag': undefined,\n } as DepositAddress;\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"OrderResponse\": {\"pair\": \"BtcNis\", \"HasError\": False, \"Error\": \"\", \"Message\": \"\"},\n \"NewOrder\": {\n \"created\": 1505531577,\n \"type\": 0,\n \"order_type\": 0,\n \"status_type\": 0,\n \"amount\": 0.01,\n \"price\": 10000,\n \"stop\": 0,\n \"id\": 9244416,\n \"initialAmount\": None,\n },\n }",
"{\n \"pair\": \"BtcNis\",\n \"status\": \"Completed\",\n \"created\": 1535555837,\n \"type\": 0,\n \"order_type\": 0,\n \"amount\": 0.00000000,\n \"price\": 120000.00000000,\n \"stop\": 0,\n \"id\": 10555173,\n \"initialAmount\": 2.00000000\n }"
],
"line_end" => 751,
"line_start" => 639,
"mappings" => [
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "clientOrderId",
"value" => "undefined"
},
%{
"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" => "undefined"
},
%{
"comment" => nil,
"key" => "postOnly",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "triggerPrice",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "filled",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "remaining",
"value" => "remaining"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "trades",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "fee",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "order"
},
%{
"comment" => nil,
"key" => "average",
"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 // \"OrderResponse\": {\"pair\": \"BtcNis\", \"HasError\": False, \"Error\": \"\", \"Message\": \"\"},\n // \"NewOrder\": {\n // \"created\": 1505531577,\n // \"type\": 0,\n // \"order_type\": 0,\n // \"status_type\": 0,\n // \"amount\": 0.01,\n // \"price\": 10000,\n // \"stop\": 0,\n // \"id\": 9244416,\n // \"initialAmount\": None,\n // },\n // }\n // fetchOrder, fetchOpenOrders\n // {\n // \"pair\": \"BtcNis\",\n // \"status\": \"Completed\",\n // \"created\": 1535555837,\n // \"type\": 0,\n // \"order_type\": 0,\n // \"amount\": 0.00000000,\n // \"price\": 120000.00000000,\n // \"stop\": 0,\n // \"id\": 10555173,\n // \"initialAmount\": 2.00000000\n // }\n //\n let orderUnified = undefined;\n let isNewOrder = false;\n if ('NewOrder' in order) {\n orderUnified = order['NewOrder'];\n isNewOrder = true;\n } else {\n orderUnified = order;\n }\n const id = this.safeString (orderUnified, 'id');\n const symbol = this.safeSymbol (undefined, market);\n const timestamp = this.safeIntegerProduct (orderUnified, 'created', 1000);\n // status field vary between responses\n // bit2c status type:\n // 0 = New\n // 1 = Open\n // 5 = Completed\n let status: string;\n if (isNewOrder) {\n const tempStatus = this.safeInteger (orderUnified, 'status_type');\n if (tempStatus === 0 || tempStatus === 1) {\n status = 'open';\n } else if (tempStatus === 5) {\n status = 'closed';\n }\n } else {\n const tempStatus = this.safeString (orderUnified, 'status');\n if (tempStatus === 'New' || tempStatus === 'Open') {\n status = 'open';\n } else if (tempStatus === 'Completed') {\n status = 'closed';\n }\n }\n // bit2c order type:\n // 0 = LMT, 1 = MKT\n let type = this.safeString (orderUnified, 'order_type');\n if (type === '0') {\n type = 'limit';\n } else if (type === '1') {\n type = 'market';\n }\n // bit2c side:\n // 0 = buy, 1 = sell\n let side = this.safeString (orderUnified, 'type');\n if (side === '0') {\n side = 'buy';\n } else if (side === '1') {\n side = 'sell';\n }\n const price = this.safeString (orderUnified, 'price');\n let amount = undefined;\n let remaining = undefined;\n if (isNewOrder) {\n amount = this.safeString (orderUnified, 'amount'); // NOTE:'initialAmount' is currently not set on new order\n remaining = this.safeString (orderUnified, 'amount');\n } else {\n amount = this.safeString (orderUnified, 'initialAmount');\n remaining = this.safeString (orderUnified, 'amount');\n }\n return this.safeOrder ({\n 'id': id,\n 'clientOrderId': undefined,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'lastTradeTimestamp': undefined,\n 'status': status,\n 'symbol': symbol,\n 'type': type,\n 'timeInForce': undefined,\n 'postOnly': undefined,\n 'side': side,\n 'price': price,\n 'triggerPrice': undefined,\n 'amount': amount,\n 'filled': undefined,\n 'remaining': remaining,\n 'cost': undefined,\n 'trades': undefined,\n 'fee': undefined,\n 'info': order,\n 'average': undefined,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [],
"line_end" => 411,
"line_start" => 384,
"mappings" => [
%{
"comment" => nil,
"key" => "symbol",
"value" => "symbol"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "high",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "low",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "bid",
"value" => "this.safeString (ticker, 'h')"
},
%{
"comment" => nil,
"key" => "bidVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "ask",
"value" => "this.safeString (ticker, 'l')"
},
%{
"comment" => nil,
"key" => "askVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "vwap",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "open",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "close",
"value" => "last"
},
%{
"comment" => nil,
"key" => "last",
"value" => "last"
},
%{
"comment" => nil,
"key" => "previousClose",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "change",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "percentage",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "average",
"value" => "averagePrice"
},
%{
"comment" => nil,
"key" => "baseVolume",
"value" => "baseVolume"
},
%{
"comment" => nil,
"key" => "quoteVolume",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "info",
"value" => "ticker"
}
],
"name" => "parseTicker",
"signature" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker",
"source" => "parseTicker (ticker: Dict, market: Market = undefined): Ticker {\n const symbol = this.safeSymbol (undefined, market);\n const averagePrice = this.safeString (ticker, 'av');\n const baseVolume = this.safeString (ticker, 'a');\n const last = this.safeString (ticker, 'll');\n return this.safeTicker ({\n 'symbol': symbol,\n 'timestamp': undefined,\n 'datetime': undefined,\n 'high': undefined,\n 'low': undefined,\n 'bid': this.safeString (ticker, 'h'),\n 'bidVolume': undefined,\n 'ask': this.safeString (ticker, 'l'),\n 'askVolume': undefined,\n 'vwap': undefined,\n 'open': undefined,\n 'close': last,\n 'last': last,\n 'previousClose': undefined,\n 'change': undefined,\n 'percentage': undefined,\n 'average': averagePrice,\n 'baseVolume': baseVolume,\n 'quoteVolume': undefined,\n 'info': ticker,\n }, market);\n }"
},
%{
"comment" => nil,
"examples" => [
"{\n \"date\":1651785980,\n \"price\":127975.68,\n \"amount\":0.3750321,\n \"isBid\":true,\n \"tid\":1261018\n }",
"{\n \"ticks\":1574767951,\n \"created\":\"26/11/19 13:32\",\n \"action\":1,\n \"price\":\"1,000\",\n \"pair\":\"EthNis\",\n \"reference\":\"EthNis|10867390|10867377\",\n \"fee\":\"0.5\",\n \"feeAmount\":\"0.08\",\n \"feeCoin\":\"₪\",\n \"firstAmount\":\"-0.015\",\n \"firstAmountBalance\":\"9\",\n \"secondAmount\":\"14.93\",\n \"secondAmountBalance\":\"130,233.28\",\n \"firstCoin\":\"ETH\",\n \"secondCoin\":\"₪\"\n \"isMaker\": True,\n }"
],
"line_end" => 929,
"line_start" => 831,
"mappings" => [
%{
"comment" => nil,
"key" => "info",
"value" => "trade"
},
%{
"comment" => nil,
"key" => "id",
"value" => "id"
},
%{
"comment" => nil,
"key" => "timestamp",
"value" => "timestamp"
},
%{
"comment" => nil,
"key" => "datetime",
"value" => "this.iso8601 (timestamp)"
},
%{
"comment" => nil,
"key" => "symbol",
"value" => "market['symbol']"
},
%{
"comment" => nil,
"key" => "order",
"value" => "orderId"
},
%{
"comment" => nil,
"key" => "type",
"value" => "undefined"
},
%{
"comment" => nil,
"key" => "side",
"value" => "side"
},
%{
"comment" => nil,
"key" => "takerOrMaker",
"value" => "makerOrTaker"
},
%{
"comment" => nil,
"key" => "price",
"value" => "price"
},
%{
"comment" => nil,
"key" => "amount",
"value" => "amount"
},
%{
"comment" => nil,
"key" => "cost",
"value" => "undefined"
},
%{
"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 // public fetchTrades\n //\n // {\n // \"date\":1651785980,\n // \"price\":127975.68,\n // \"amount\":0.3750321,\n // \"isBid\":true,\n // \"tid\":1261018\n // }\n //\n // private fetchMyTrades\n //\n // {\n // \"ticks\":1574767951,\n // \"created\":\"26/11/19 13:32\",\n // \"action\":1,\n // \"price\":\"1,000\",\n // \"pair\":\"EthNis\",\n // \"reference\":\"EthNis|10867390|10867377\",\n // \"fee\":\"0.5\",\n // \"feeAmount\":\"0.08\",\n // \"feeCoin\":\"₪\",\n // \"firstAmount\":\"-0.015\",\n // \"firstAmountBalance\":\"9\",\n // \"secondAmount\":\"14.93\",\n // \"secondAmountBalance\":\"130,233.28\",\n // \"firstCoin\":\"ETH\",\n // \"secondCoin\":\"₪\"\n // \"isMaker\": True,\n // }\n //\n let timestamp: Int;\n let id: Str;\n let price = undefined;\n let amount = undefined;\n let orderId = undefined;\n let fee = undefined;\n let side: string;\n let makerOrTaker = undefined;\n const reference = this.safeString (trade, 'reference');\n if (reference !== undefined) {\n id = reference;\n timestamp = this.safeTimestamp (trade, 'ticks');\n price = this.safeString (trade, 'price');\n price = this.removeCommaFromValue (price);\n amount = this.safeString (trade, 'firstAmount');\n const reference_parts = reference.split ('|'); // reference contains 'pair|orderId_by_taker|orderId_by_maker'\n const marketId = this.safeString (trade, 'pair');\n market = this.safeMarket (marketId, market);\n market = this.safeMarket (reference_parts[0], market);\n const isMaker = this.safeValue (trade, 'isMaker');\n makerOrTaker = isMaker ? 'maker' : 'taker';\n orderId = isMaker ? reference_parts[2] : reference_parts[1];\n const action = this.safeInteger (trade, 'action');\n if (action === 0) {\n side = 'buy';\n } else {\n side = 'sell';\n }\n const feeCost = this.safeString (trade, 'feeAmount');\n if (feeCost !== undefined) {\n fee = {\n 'cost': feeCost,\n 'currency': 'NIS',\n };\n }\n } else {\n timestamp = this.safeTimestamp (trade, 'date');\n id = this.safeString (trade, 'tid');\n price = this.safeString (trade, 'price');\n amount = this.safeString (trade, 'amount');\n side = this.safeValue (trade, 'isBid');\n if (side !== undefined) {\n if (side) {\n side = 'buy';\n } else {\n side = 'sell';\n }\n }\n }\n market = this.safeMarket (undefined, market);\n return this.safeTrade ({\n 'info': trade,\n 'id': id,\n 'timestamp': timestamp,\n 'datetime': this.iso8601 (timestamp),\n 'symbol': market['symbol'],\n 'order': orderId,\n 'type': undefined,\n 'side': side,\n 'takerOrMaker': makerOrTaker,\n 'price': price,\n 'amount': amount,\n 'cost': undefined,\n 'fee': fee,\n }, market);\n }"
}
],
path_prefix: "",
pro: false,
quote_json_numbers: nil,
rate_limits: %{
interval_ms: 3000,
period: 1000,
requests: 0,
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: %{
confidence: :medium,
pattern: :hmac_sha512_nonce,
signature_encoding: :base64
},
spec_format_version: 1,
status: %{
"eta" => nil,
"status" => "ok",
"updated" => nil,
"url" => nil
},
symbol_format: nil,
symbol_formats: %{
precision_mode: 4,
sample_limits: %{
"amount" => %{},
"cost" => %{},
"price" => %{}
},
sample_precision: %{},
spot: %{
base: "BTC",
base_id: "Btc",
contract: false,
id: "BtcNis",
limits: %{
"amount" => %{},
"cost" => %{},
"leverage" => %{},
"price" => %{}
},
precision: %{},
quote: "NIS",
quote_id: "Nis",
separator: "",
symbol: "BTC/NIS"
}
},
symbol_patterns: %{
spot: %{
case: :mixed,
component_order: nil,
date_format: nil,
pattern: :no_separator_mixed,
separator: "",
suffix: nil
}
},
timeframes: %{},
url_strategy: %{
detected_from: "fallback",
pattern: :no_prefix,
prefix: nil
},
urls: %{
api: "https://bit2c.co.il",
doc: [
"https://www.bit2c.co.il/home/api",
"https://github.com/OferE/bit2c"
],
other: nil,
sandbox: nil,
www: "https://www.bit2c.co.il"
},
version: nil,
ws: nil
}