diff --git a/README.md b/README.md index 89db5dec..5cde37e7 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Run Arke with this command ```yaml log_level: INFO accounts: -- id: 1 +- id: example-account1 driver: rubykube debug: false host: "https://example.com" @@ -25,18 +25,17 @@ accounts: secret: "" delay: 0.75 -- id: 2 +- id: example-account2 driver: rubykube debug: false host: "https://example.com" ws: "wss://example.com" key: "" secret: "" - delay: 0.01 + delay: 1 -- id: 3 +- id: binance-account driver: binance - host: "api.binance.com" key: "" secret: "" delay: 1 @@ -59,24 +58,14 @@ strategies: min_order_back_amount: 0.0002 target: - account_id: 1 + account_id: example-account1 market: id: BTCUSDT - base: btc - quote: usdt - base_precision: 4 - quote_precision: 4 - min_ask_amount: 0.015 - min_bid_amount: 0.015 sources: - - account_id: 3 + - account_id: binance-account market: id: BTCUSDT - base: BTC - quote: USDT - base_precision: 8 - quote_precision: 8 - id: BTCUSDT-micro type: microtrades @@ -92,13 +81,9 @@ strategies: max_price: 230 target: - account_id: 2 + account_id: example-account2 market: id: BTCUSDT - base: btc - quote: usdt - base_precision: 4 - quote_precision: 4 ``` @@ -106,7 +91,7 @@ strategies: | Field | Description | | -------- | ------------------------------------------------------------ | -| `id` | ID identifying the account (have to be unique) | +| `id` | ID identifying the account (must be unique) | | `driver` | Name of exchange driver (supported values are: `rubykube`, `binance`, `bitfinex`) | | `debug` | Flag to extend logs verbosity, valid values are: `true` or `false` | | `host` | Base URL of the exchange API | @@ -227,10 +212,6 @@ The spread applied on circuitbraker strategy should be lower than the spead used | Field | Description | | ----------------------- | ------------------------------------------------------------ | | `id` | ID of market | -| `base` | Base currency of market | -| `quote` | Quote currency of market | -| `base_precision` | Base precision of market | -| `quote_precision` | Quote precision of market | diff --git a/bin/luno-fetch-markets-config b/bin/luno-fetch-markets-config new file mode 100755 index 00000000..6f09cdbb --- /dev/null +++ b/bin/luno-fetch-markets-config @@ -0,0 +1,21 @@ +#!/bin/ruby +# frozen_string_literal: true + +require "pp" +require "json" +require "faraday" + +pairs = %w[XBTEUR XBTIDR ETHNGN ETHZAR XBTMYR XBTNGN ETHXBT XBTZAR XBTZMW XBTSGD XBTUGX BCHXBT] +config = {} + +pairs.each do |pair| + raise "Can't deduce base/quote from #{pair}" if pair.size != 6 + + warn "fetching #{pair}" + response = Faraday.get "https://www.luno.com/ajax/1/market_params?pair=#{pair}" + config[pair] = JSON.parse(response.body) + config[pair]["base_unit"] = pair[0..2] + config[pair]["quote_unit"] = pair[3..5] +end + +pp config diff --git a/config/strategies.yml b/config/strategies.yml index 21e33305..1a040998 100644 --- a/config/strategies.yml +++ b/config/strategies.yml @@ -1,4 +1,4 @@ -log_level: DEBUG +log_level: INFO accounts: - id: demo @@ -6,9 +6,9 @@ accounts: debug: false host: "https://demo.openware.com" ws: "wss://demo.openware.com" - key: "353886962a3b3a79" - secret: "36827b03603d94496518390737a30562" - delay: 3 + key: "df6330db624fcc67" + secret: "c2ac593fd25281a4cbf9df6f88d700a0" + delay: 1 - id: bitfaker driver: bitfaker @@ -27,11 +27,11 @@ accounts: delay: 1 strategies: -- id: copy-FTHUSD +- id: copy-ETHUSD type: copy debug: true enabled: true - period: 5 + period: 30 params: spread_bids: 0.003 spread_asks: 0.003 @@ -44,21 +44,12 @@ strategies: target: account_id: demo market: - id: fthusd - base: fth - quote: usd - base_precision: 2 - quote_precision: 2 - min_bid_amount: 0.01 - min_ask_amount: 0.01 + - id: ethusd + sources: - account_id: binance market: - id: ETHUSDT - base: ETH - quote: USDT - min_bid_amount: 0.01 - min_ask_amount: 0.01 + - id: ETHUSDT - id: microtrades-FTHUSD type: microtrades @@ -72,11 +63,4 @@ strategies: max_amount: 0.30 target: account_id: demo - market: - id: fthusd - base: fth - quote: usd - base_precision: 2 - quote_precision: 2 - min_ask_amount: 0.01 - min_bid_amount: 0.01 + market: { id: ethusd } diff --git a/lib/arke/action_executor.rb b/lib/arke/action_executor.rb index 7ce91688..fcaca0e9 100644 --- a/lib/arke/action_executor.rb +++ b/lib/arke/action_executor.rb @@ -83,9 +83,9 @@ def schedule(action) execute do order = action.params[:order] logger.info { "ACCOUNT:#{id} #{CREATING} #{colored_side(order.side)} order: #{action.params}" } - price = apply_precision(order.price, action.destination.quote_precision) - amount = apply_precision(order.amount, action.destination.base_precision.to_f, - order.side == :sell ? action.destination.min_ask_amount.to_f : action.destination.min_bid_amount.to_f) + price = apply_precision(order.price, action.destination.price_precision) + amount = apply_precision(order.amount, action.destination.amount_precision.to_f, + order.side == :sell ? action.destination.min_amount.to_f : action.destination.min_amount.to_f) begin order = Arke::Order.new(order.market, price, amount, order.side) action.destination.account.create_order(order) diff --git a/lib/arke/exchange/base.rb b/lib/arke/exchange/base.rb index a3e5c874..3242fa27 100644 --- a/lib/arke/exchange/base.rb +++ b/lib/arke/exchange/base.rb @@ -195,6 +195,10 @@ def balance(currency) @balances.find {|b| b["currency"].casecmp?(currency) } end + def market_config(_market) + raise "#{self.class} doesn't support market_config" + end + def build_query(params) params.keys.sort.map {|k| "#{Faraday::Utils.escape(k)}=#{Faraday::Utils.escape(params[k])}" }.join("&") end diff --git a/lib/arke/exchange/binance.rb b/lib/arke/exchange/binance.rb index 9d23ff0e..0d060432 100644 --- a/lib/arke/exchange/binance.rb +++ b/lib/arke/exchange/binance.rb @@ -11,7 +11,7 @@ def initialize(opts) @client = ::Binance::Client::REST.new(api_key: @api_key, secret_key: @secret, adapter: @adapter) @min_notional = {} @min_quantity = {} - @base_precision = {} + @amount_precision = {} @markets = opts["markets"] end @@ -102,13 +102,13 @@ def markets def get_amount(order) min_notional = @min_notional[order.market] ||= get_min_notional(order.market) - base_precision = @base_precision[order.market] ||= get_base_precision(order.market) + amount_precision = @amount_precision[order.market] ||= get_amount_precision(order.market) percentage = 0.2 notional = order.price * order.amount if notional > min_notional order.amount elsif (min_notional * percentage) < notional - return (min_notional / order.price).ceil(base_precision) + return (min_notional / order.price).ceil(amount_precision) else raise "Amount of order too small" end @@ -155,7 +155,7 @@ def fetch_openorders(market) end end - def get_base_precision(market) + def get_amount_precision(market) min_quantity = @min_quantity[market] ||= get_min_quantity(market) return 0 if min_quantity >= 1 @@ -167,16 +167,39 @@ def get_base_precision(market) n end + def get_symbol_info(market) + @exchange_info ||= @client.exchange_info["symbols"] + @exchange_info.find {|s| s["symbol"] == market } + end + + def get_symbol_filter(market, filter) + get_symbol_info(market)["filters"].find {|f| f["filterType"] == filter } + end + def get_min_quantity(market) - @client.exchange_info["symbols"] - .find {|s| s["symbol"] == market }["filters"] - .find {|f| f["filterType"] == "LOT_SIZE" }["minQty"].to_f + get_symbol_filter(market, "LOT_SIZE")["minQty"].to_f end def get_min_notional(market) - @client.exchange_info["symbols"] - .find {|s| s["symbol"] == market }["filters"] - .find {|f| f["filterType"] == "MIN_NOTIONAL" }["minNotional"].to_f + get_symbol_filter(market, "MIN_NOTIONAL")["minNotional"].to_f + end + + def market_config(market) + info = get_symbol_info(market) + raise "#{market} not found" unless info + + price_filter = get_symbol_filter(market, "PRICE_FILTER") + + { + "id" => info.fetch("symbol"), + "base_unit" => info.fetch("baseAsset"), + "quote_unit" => info.fetch("quoteAsset"), + "min_price" => price_filter&.fetch("minPrice").to_f, + "max_price" => price_filter&.fetch("maxPrice").to_f, + "min_amount" => get_min_quantity(market), + "amount_precision" => info.fetch("baseAssetPrecision"), + "price_precision" => info.fetch("quotePrecision") + } end end end diff --git a/lib/arke/exchange/bitfaker.rb b/lib/arke/exchange/bitfaker.rb index c45fc17e..ad40bc29 100644 --- a/lib/arke/exchange/bitfaker.rb +++ b/lib/arke/exchange/bitfaker.rb @@ -45,20 +45,16 @@ def get_balances ] end - def get_market_infos(_market) + def market_config(_market) { "id" => "BTCUSD", - "name" => "BTC/USD", "base_unit" => "BTC", "quote_unit" => "USD", - "ask_fee" => "0.0002", - "bid_fee" => "0.0002", - "min_price" => "0.0", - "max_price" => "0.0", - "min_amount" => "0.00001", + "min_price" => 0.0, + "max_price" => 0.0, + "min_amount" => 0.1, "amount_precision" => 6, "price_precision" => 6, - "state" => "enabled", } end @@ -98,9 +94,8 @@ def ping; end private def add_order(order) - _id, price, amount = order - side = amount.negative? ? :sell : :buy - amount = amount.abs + _id, _price, amount = order + amount.abs end end end diff --git a/lib/arke/exchange/bitfinex.rb b/lib/arke/exchange/bitfinex.rb index 2e0b2527..3bf73b88 100644 --- a/lib/arke/exchange/bitfinex.rb +++ b/lib/arke/exchange/bitfinex.rb @@ -124,6 +124,26 @@ def markets @connection.get("/v1/symbols").body end + def symbols_details + @symbols_details ||= @connection.get("/v1/symbols_details").body + end + + def market_config(market) + info = symbols_details&.find {|i| i["pair"].downcase == market.downcase } + raise "Pair #{market} not found" unless info + + { + "id" => info.fetch("pair"), + "base_unit" => nil, + "quote_unit" => nil, + "min_price" => nil, + "max_price" => nil, + "min_amount" => info.fetch("minimum_order_size"), + "amount_precision" => 8, + "price_precision" => 8, + } + end + def new_trade(data, market) amount = data[2] pm_id = @platform_markets[market] diff --git a/lib/arke/exchange/hitbtc.rb b/lib/arke/exchange/hitbtc.rb index 33ce1033..064f0d2c 100644 --- a/lib/arke/exchange/hitbtc.rb +++ b/lib/arke/exchange/hitbtc.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Arke::Exchange class Hitbtc < Base attr_accessor :orderbook @@ -7,20 +9,19 @@ def initialize(opts) @ws_url = "wss://#{opts['host']}/api/2/ws" @connection = Faraday.new("https://#{opts['host']}") do |builder| - builder.use FaradayMiddleware::ParseJson, :content_type => /\bjson$/ + builder.use FaradayMiddleware::ParseJson, content_type: /\bjson$/ builder.adapter(@adapter) end @connection.basic_auth(@api_key, @secret) end - def start - end + def start; end def build_order(data, side) Arke::Order.new( @market, - data['price'].to_f, - data['size'].to_f, + data["price"].to_f, + data["size"].to_f, side ) end @@ -28,12 +29,12 @@ def build_order(data, side) def update_orderbook(market) orderbook = Arke::Orderbook::Orderbook.new(market) snapshot = @connection.get("/api/2/public/orderbook/#{market.upcase}").body - Array(snapshot['bid']).each do |order| + Array(snapshot["bid"]).each do |order| orderbook.update( build_order(order, :buy) ) end - Array(snapshot['ask']).each do |order| + Array(snapshot["ask"]).each do |order| orderbook.update( build_order(order, :sell) ) @@ -46,43 +47,62 @@ def get_balances balances.map do |data| { "currency" => data["currency"], - "free" => data["available"].to_f, - "locked" => data["reserved"].to_f, - "total" => data["available"].to_f + data["reserved"].to_f, + "free" => data["available"].to_f, + "locked" => data["reserved"].to_f, + "total" => data["available"].to_f + data["reserved"].to_f, } end end def create_order(order) ord = { - symbol: order.market.upcase, - side: order.side, + symbol: order.market.upcase, + side: order.side, quantity: order.amount, - price: order.price + price: order.price } @connection.post do |req| - req.url '/api/2/order' + req.url "/api/2/order" req.body = ord end end + def symbols + @symbols ||= @connection.get("/api/2/public/symbol").body + end + def markets - @connection.get("/api/2/public/symbol").body - .map { |s| s['id'] } + symbols.map {|s| s["id"] } + end + + def market_config(market) + market_infos = symbols.find {|s| s["id"] == market } + raise "Symbol #{market} not found" unless market_infos + + { + "id" => market_infos.fetch("id"), + "base_unit" => market_infos["baseCurrency"], + "quote_unit" => market_infos["quoteCurrency"], + "min_price" => nil, + "max_price" => nil, + "min_amount" => market_infos["quantityIncrement"].to_f, + "amount_precision" => value_precision(market_infos["quantityIncrement"].to_f), + "price_precision" => value_precision(market_infos["tickSize"].to_f), + } end - def on_open_trades(markets_list = nil) + def on_open_trades(markets_list=nil) markets_list.each do |market| sub = { method: "subscribeTrades", params: { symbol: market.upcase, - limit: 1 + limit: 1 }, - id: 1 + id: 1 } - info 'Open event' + sub.to_s + info "Open event" + sub.to_s EM.next_tick { @ws.send(JSON.generate(sub)) } @@ -90,16 +110,16 @@ def on_open_trades(markets_list = nil) end def detect_trades(msg) - market = msg['params']['symbol'] + market = msg["params"]["symbol"] pm_id = @platform_markets[market] - msg['params']['data'].each do |t| + msg["params"]["data"].each do |t| trade = Trade.new( - price: t['price'], - amount: t['quantity'], - taker_type: t['side'], + price: t["price"], + amount: t["quantity"], + taker_type: t["side"], platform_market_id: pm_id ) - @opts[:on_trade].call(trade, market) if @opts[:on_trade] + @opts[:on_trade]&.call(trade, market) end end @@ -107,18 +127,16 @@ def on_close(e) info "Closing code: #{e.code} Reason: #{e.reason}" end - def listen_trades(markets_list = nil) + def listen_trades(markets_list=nil) @ws = Faye::WebSocket::Client.new(@ws_url) - @ws.on(:open) do |e| + @ws.on(:open) do |_e| on_open_trades(markets_list) end @ws.on(:message) do |e| msg = JSON.parse(e.data) - if msg['method'] =='updateTrades' - detect_trades(msg) - end + detect_trades(msg) if msg["method"] == "updateTrades" end @ws.on(:close) do |e| diff --git a/lib/arke/exchange/huobi.rb b/lib/arke/exchange/huobi.rb index 621b5da8..3c5d1815 100644 --- a/lib/arke/exchange/huobi.rb +++ b/lib/arke/exchange/huobi.rb @@ -2,11 +2,12 @@ module Arke::Exchange class Huobi < Base - attr_reader :orderbook + attr_reader :orderbook, :ts_pattern def initialize(opts) super + @ts_pattern = opts['ts_pattern'] || "%Y-%m-%dT%H:%M:%S" @connection = Faraday.new(url: "https://#{opts['host']}") do |builder| builder.response :logger if opts["debug"] builder.use FaradayMiddleware::ParseJson, content_type: /\bjson$/ @@ -87,6 +88,27 @@ def fetch_openorders(market) end end + def symbols + get("/v1/common/symbols").body["data"] + end + + def market_config(market) + market_infos = symbols.find {|s| s["symbol"] == market } + raise "Symbol #{market} not found" unless market_infos + + { + "id" => market_infos.fetch("symbol"), + "base_unit" => market_infos["base-currency"], + "quote_unit" => market_infos["quote-currency"], + "min_price" => nil, + "max_price" => nil, + "min_amount" => market_infos["min-order-amt"], + "max_amount" => market_infos["max-order-amt"], + "amount_precision" => market_infos["amount-precision"], + "price_precision" => market_infos["price-precision"], + } + end + private def build_order(data, side) @@ -103,7 +125,7 @@ def authenticated_request(path, method, params={}) AccessKeyId: @api_key, SignatureMethod: "HmacSHA256", SignatureVersion: 2, - Timestamp: Time.now.getutc.strftime("%Y-%m-%dT%H:%M:%S") + Timestamp: Time.now.getutc.strftime(ts_pattern) } h = h.merge(params) if method == "GET" data = "#{method}\napi.huobi.pro\n#{path}\n#{Rack::Utils.build_query(hash_sort(h))}" diff --git a/lib/arke/exchange/kraken.rb b/lib/arke/exchange/kraken.rb index b9114177..a7199ebc 100644 --- a/lib/arke/exchange/kraken.rb +++ b/lib/arke/exchange/kraken.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Arke::Exchange class Kraken < Base attr_accessor :orderbook @@ -8,15 +10,15 @@ def initialize(opts) ws_url = "wss://ws-beta.kraken.com" @ws = Faye::WebSocket::Client.new(ws_url) end + opts["host"] ||= "api.kraken.com" rest_url = "https://#{opts['host']}" @rest_conn = Faraday.new(rest_url) do |builder| builder.adapter(opts[:faraday_adapter] || :em_synchrony) end - kraken_pair + symbols end - def start - end + def start; end def build_order(data, side) Arke::Order.new( @@ -30,40 +32,56 @@ def build_order(data, side) def update_orderbook(market) orderbook = Arke::Orderbook::Orderbook.new(market) snapshot = JSON.parse(@rest_conn.get("/0/public/Depth?pair=#{market.upcase}").body) - result = snapshot['result'] - return orderbook if result.nil? or result.values.nil? + result = snapshot["result"] + return orderbook if result.nil? || result.values.nil? - Array(result.values.first['bids']).each do |order| + Array(result.values.first["bids"]).each do |order| orderbook.update(build_order(order, :buy)) end - Array(result.values.first['asks']).each do |order| + Array(result.values.first["asks"]).each do |order| orderbook.update(build_order(order, :sell)) end orderbook end - def kraken_pair - @kraken_pair ||= JSON.parse(@rest_conn.get("/0/public/AssetPairs").body) + def symbols + @symbols ||= JSON.parse(@rest_conn.get("/0/public/AssetPairs").body)["result"] end def markets - @markets ||= kraken_pair['result'].values.each_with_object([]) do |p, arr| - arr << p['altname'].downcase + @markets ||= symbols.values.each_with_object([]) do |p, arr| + arr << p["altname"].downcase end end + def market_config(market) + market_infos = symbols.find{|_, s| s["altname"] == market }&.last + raise "Symbol #{market} not found" unless market_infos + + { + "id" => market_infos.fetch("altname"), + "base_unit" => market_infos["base"], + "quote_unit" => market_infos["quote"], + "min_price" => nil, + "max_price" => nil, + "min_amount" => nil, + "amount_precision" => market_infos["lot_decimals"], + "price_precision" => market_infos["pair_decimals"], + } + end + def markets_ws_map - @markets_ws_map ||= kraken_pair['result'].values.each_with_object({}) do |p, h| - h[p['altname'].downcase] = p['wsname'] + @markets_ws_map ||= symbols.values.each_with_object({}) do |p, h| + h[p["altname"].downcase] = p["wsname"] end end def on_open_trades(markets_list) - ws_markets = markets_list.map { |market| markets_ws_map[market] } + ws_markets = markets_list.map {|market| markets_ws_map[market] } sub = { - "event": "subscribe", - "pair": ws_markets, + "event": "subscribe", + "pair": ws_markets, "subscription": { "name": "trade" } @@ -80,15 +98,15 @@ def new_trade(msg) market = msg.last pm_id = @platform_markets[market] data.each do |t| - taker_type = t[3] == 'b' ? :buy : :sell + taker_type = t[3] == "b" ? :buy : :sell trade = Trade.new( - price: t[0], - amount: t[1], + price: t[0], + amount: t[1], platform_market_id: pm_id, - taker_type: taker_type, - created_at: t[2], + taker_type: taker_type, + created_at: t[2] ) - @opts[:on_trade].call(trade, market) if @opts[:on_trade] + @opts[:on_trade]&.call(trade, market) end end @@ -96,16 +114,16 @@ def on_close(e) info "Closing code: #{e.code}: #{e}" end - def listen_trades(markets_list = nil) + def listen_trades(markets_list=nil) info "Connecting to websocket: #{@ws_url}" - @ws.on(:open) do |e| + @ws.on(:open) do |_e| on_open_trades(markets_list) end @ws.on(:message) do |e| msg = JSON.parse(e.data) - new_trade(msg) if msg.kind_of?(Array) + new_trade(msg) if msg.is_a?(Array) end @ws.on(:close) do |e| diff --git a/lib/arke/exchange/luno.rb b/lib/arke/exchange/luno.rb index 2fec3673..8a8e5a68 100644 --- a/lib/arke/exchange/luno.rb +++ b/lib/arke/exchange/luno.rb @@ -86,5 +86,205 @@ def create_order(order) BitX.conn.basic_auth(@api_key, @secret) BitX.conn.post(path, params) end + + def market_config(market) + info = symbols_details[market.upcase] + raise "Pair #{market} not found" unless info + + { + "id" => market, + "base_unit" => info["base_unit"], + "quote_unit" => info["quote_unit"], + "min_price" => info["min_price"].to_f, + "max_price" => info["max_price"].to_f, + "min_amount" => info["min_volume"].to_f, + "max_amount" => info["max_volume"].to_f, + "amount_precision" => info["volume_scale"].to_f, + "price_precision" => info["price_scale"].to_f, + } + end + + def symbols_details + {"XBTEUR" => + {"price_scale" => 2, + "volume_scale" => 4, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "100.00", + "max_price" => "20000.00", + "reserve_fee" => "0.0025", + "maker_fee" => "0.00", + "taker_fee" => "0.0025", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "XBT", + "quote_unit" => "EUR"}, + "XBTIDR" => + {"price_scale" => -3, + "volume_scale" => 6, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "10.00", + "max_price" => "700000000.00", + "reserve_fee" => "0.002", + "maker_fee" => "0.00", + "taker_fee" => "0.002", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "XBT", + "quote_unit" => "IDR"}, + "ETHNGN" => + {"price_scale" => 0, + "volume_scale" => 6, + "min_volume" => "0.005", + "max_volume" => "200.00", + "min_price" => "5000.00", + "max_price" => "10000000.00", + "reserve_fee" => "0.01", + "maker_fee" => "0.00", + "taker_fee" => "0.01", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "ETH", + "quote_unit" => "NGN"}, + "ETHZAR" => + {"price_scale" => 0, + "volume_scale" => 6, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "1000.00", + "max_price" => "10000.00", + "reserve_fee" => "0.01", + "maker_fee" => "0.00", + "taker_fee" => "0.01", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "ETH", + "quote_unit" => "ZAR"}, + "XBTMYR" => + {"price_scale" => 0, + "volume_scale" => 6, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "10000.00", + "max_price" => "150000.00", + "reserve_fee" => "0.01", + "maker_fee" => "0.00", + "taker_fee" => "0.01", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "XBT", + "quote_unit" => "MYR"}, + "XBTNGN" => + {"price_scale" => 0, + "volume_scale" => 6, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "10.00", + "max_price" => "25000000.00", + "reserve_fee" => "0.01", + "maker_fee" => "0.00", + "taker_fee" => "0.01", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "XBT", + "quote_unit" => "NGN"}, + "ETHXBT" => + {"price_scale" => 4, + "volume_scale" => 2, + "min_volume" => "0.01", + "max_volume" => "100.00", + "min_price" => "0.0001", + "max_price" => "1.00", + "reserve_fee" => "0.0025", + "maker_fee" => "0.00", + "taker_fee" => "0.0025", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.0222], + "base_unit" => "ETH", + "quote_unit" => "XBT"}, + "XBTZAR" => + {"price_scale" => 0, + "volume_scale" => 6, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "10.00", + "max_price" => "1000000.00", + "reserve_fee" => "0.01", + "maker_fee" => "0.00", + "taker_fee" => "0.01", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "XBT", + "quote_unit" => "ZAR"}, + "XBTZMW" => + {"price_scale" => 0, + "volume_scale" => 6, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "10.00", + "max_price" => "1000000.00", + "reserve_fee" => "0.01", + "maker_fee" => "0.00", + "taker_fee" => "0.01", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "XBT", + "quote_unit" => "ZMW"}, + "XBTSGD" => + {"price_scale" => 2, + "volume_scale" => 4, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "1000.00", + "max_price" => "100000.00", + "reserve_fee" => "0.0055", + "maker_fee" => "0.00", + "taker_fee" => "0.0055", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "XBT", + "quote_unit" => "SGD"}, + "XBTUGX" => + {"price_scale" => -3, + "volume_scale" => 6, + "min_volume" => "0.0005", + "max_volume" => "100.00", + "min_price" => "1000.00", + "max_price" => "200000000.00", + "reserve_fee" => "0.0025", + "maker_fee" => "0.00", + "taker_fee" => "0.0025", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "XBT", + "quote_unit" => "UGX"}, + "BCHXBT" => + {"price_scale" => 4, + "volume_scale" => 2, + "min_volume" => "0.01", + "max_volume" => "100.00", + "min_price" => "0.0001", + "max_price" => "1.00", + "reserve_fee" => "0.0025", + "maker_fee" => "0.00", + "taker_fee" => "0.0025", + "thirty_day_volume" => "0.00", + "fee_experiment" => false, + "vol_weight_params" => [-0.111, 0.111], + "base_unit" => "BCH", + "quote_unit" => "XBT"}} + end end end diff --git a/lib/arke/exchange/okex.rb b/lib/arke/exchange/okex.rb index 91fdfe98..ac4cf9c9 100644 --- a/lib/arke/exchange/okex.rb +++ b/lib/arke/exchange/okex.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Arke::Exchange class Okex < Base attr_accessor :orderbook @@ -10,8 +12,7 @@ def initialize(opts) end end - def start - end + def start; end def build_order(data, side) Arke::Order.new( @@ -26,12 +27,12 @@ def update_orderbook(market) orderbook = Arke::Orderbook::Orderbook.new(market) snapshot = JSON.parse(@connection.get("api/spot/v3/instruments/#{market}/book").body) - Array(snapshot['bids']).each do |order| + Array(snapshot["bids"]).each do |order| orderbook.update( build_order(order, :buy) ) end - Array(snapshot['asks']).each do |order| + Array(snapshot["asks"]).each do |order| orderbook.update( build_order(order, :sell) ) @@ -41,7 +42,7 @@ def update_orderbook(market) def markets JSON.parse(@connection.get("/api/spot/v3/instruments/ticker").body) - .map { |p| p['instrument_id'] } + .map {|p| p["instrument_id"] } end end end diff --git a/lib/arke/exchange/rubykube.rb b/lib/arke/exchange/rubykube.rb index f39f58f1..f5250488 100644 --- a/lib/arke/exchange/rubykube.rb +++ b/lib/arke/exchange/rubykube.rb @@ -136,12 +136,30 @@ def update_orderbook(market) def get_market_infos(market) response = @connection.get("#{@peatio_route}/public/markets").body - infos = response.select {|m| m["id"].downcase == market.downcase }.first + infos = response.select {|m| m["id"]&.downcase == market.downcase }.first raise "Market #{market} not found" unless infos infos end + def market_config(market) + market_infos = get_market_infos(market) + base_unit = market_infos["ask_unit"] || market_infos.fetch("base_unit") + quote_unit = market_infos["bid_unit"] || market_infos.fetch("quote_unit") + amount_precision = market_infos["ask_precision"] || market_infos.fetch("amount_precision") + price_precision = market_infos["bid_precision"] || market_infos.fetch("price_precision") + { + "id" => market_infos.fetch("id"), + "base_unit" => base_unit, + "quote_unit" => quote_unit, + "min_price" => (market_infos["min_price"] || market_infos["min_ask_price"])&.to_f, + "max_price" => (market_infos["max_price"] || market_infos["max_bid_price"])&.to_f, + "min_amount" => (market_infos["min_amount"] || market_infos["min_ask_amount"] || market_infos["min_bid_amount"])&.to_f, + "amount_precision" => amount_precision, + "price_precision" => price_precision + } + end + def generate_headers nonce = Time.now.to_i.to_s { @@ -201,6 +219,5 @@ def ws_read_private_message(msg) end end end - end end diff --git a/lib/arke/helpers/precision.rb b/lib/arke/helpers/precision.rb index 79aa5365..a8689807 100644 --- a/lib/arke/helpers/precision.rb +++ b/lib/arke/helpers/precision.rb @@ -1,11 +1,31 @@ +# frozen_string_literal: true + module Arke::Helpers module Precision - def apply_precision(value, precision, min_value = nil) + def apply_precision(value, precision, min_value=nil) value = value.round(12).floor(precision) - if !min_value.nil? and value < min_value - value = min_value - end + value = min_value if !min_value.nil? && (value < min_value) value end + + def value_precision(value) + if value.zero? + n = 0 + elsif value < 1 + n = 1 + while (value *= 10) < 1 + n += 1 + end + elsif value < 10 + n = 0 + else + n = -1 + while (value /= 10) > 1 + n -= 1 + pp value + end + end + n + end end end diff --git a/lib/arke/models/market.rb b/lib/arke/models/market.rb index 53201241..3591ac8a 100644 --- a/lib/arke/models/market.rb +++ b/lib/arke/models/market.rb @@ -3,19 +3,19 @@ class Arke::Market include Arke::Helpers::Flags - attr_reader :base, :quote, :base_precision, :quote_precision - attr_reader :min_ask_amount, :min_bid_amount, :account, :id, :orderbook + attr_reader :base, :quote, :amount_precision, :price_precision + attr_reader :min_amount, :account, :id, :orderbook attr_accessor :open_orders def initialize(market, account, mode=0x0) @id = market["id"] @account = account - @base = market["base"] - @quote = market["quote"] - @base_precision = market["base_precision"] - @quote_precision = market["quote_precision"] - @min_ask_amount = market["min_ask_amount"] - @min_bid_amount = market["min_bid_amount"] + market_config = account.market_config(@id) + @base = market_config["base_unit"] + @quote = market_config["quote_unit"] + @amount_precision = market_config["amount_precision"] + @price_precision = market_config["price_precision"] + @min_amount = market_config["min_amount"] @open_orders = Arke::Orderbook::OpenOrders.new(id) @orderbook = Arke::Orderbook::Orderbook.new(id) apply_flags(mode) @@ -28,10 +28,9 @@ def check_config raise "market base currency must be lowercase for this exchange" if base != base.downcase raise "market quote currency must be lowercase for this exchange" if quote != quote.downcase end - raise "base_precision is missing in market #{id} configuration" if flag?(WRITE) && @base_precision.nil? - raise "quote_precision is missing in market #{id} configuration" if flag?(WRITE) && @quote_precision.nil? - raise "min_ask_amount is missing in market #{id} configuration" if flag?(WRITE) && @min_ask_amount.nil? - raise "min_bid_amount is missing in market #{id} configuration" if flag?(WRITE) && @min_bid_amount.nil? + raise "amount_precision is missing in market #{id} configuration" if flag?(WRITE) && @amount_precision.nil? + raise "price_precision is missing in market #{id} configuration" if flag?(WRITE) && @price_precision.nil? + raise "min_amount is missing in market #{id} configuration" if flag?(WRITE) && @min_amount.nil? end def apply_flags(flags) @@ -42,9 +41,7 @@ def apply_flags(flags) def start check_config - if flag?(FETCH_PRIVATE_OPEN_ORDERS) - fetch_openorders - end + fetch_openorders if flag?(FETCH_PRIVATE_OPEN_ORDERS) end def update_orderbook diff --git a/lib/arke/orderbook/orderbook.rb b/lib/arke/orderbook/orderbook.rb index 8d46bc4f..2c144f14 100644 --- a/lib/arke/orderbook/orderbook.rb +++ b/lib/arke/orderbook/orderbook.rb @@ -74,9 +74,9 @@ def aggregate_side(side, price_points, minimum_volume=0.1) [final_tree, volume_base, volume_quote] end - def aggregate(price_points_buy, price_points_sell, min_ask_amount, min_bid_amount) - bids_ob, vol_bids_base, vol_bids_quote = aggregate_side(:buy, price_points_buy, min_bid_amount) - asks_ob, vol_asks_base, vol_asks_quote = aggregate_side(:sell, price_points_sell, min_ask_amount) + def aggregate(price_points_buy, price_points_sell, min_amount) + bids_ob, vol_bids_base, vol_bids_quote = aggregate_side(:buy, price_points_buy, min_amount) + asks_ob, vol_asks_base, vol_asks_quote = aggregate_side(:sell, price_points_sell, min_amount) Aggregated.new( @market, buy: bids_ob, diff --git a/lib/arke/scheduler/simple.rb b/lib/arke/scheduler/simple.rb index 003f6d13..ad2812c4 100644 --- a/lib/arke/scheduler/simple.rb +++ b/lib/arke/scheduler/simple.rb @@ -76,8 +76,8 @@ def schedule desired = @desired_ob[side] desired.each do |price, amount| - price = apply_precision(price, @target.quote_precision) - amount = apply_precision(amount, @target.base_precision, side == :sell ? @target.min_ask_amount : @target.min_bid_amount) + price = apply_precision(price, @target.price_precision) + amount = apply_precision(amount, @target.amount_precision, side == :sell ? @target.min_amount : @target.min_amount) if price.positive? && amount.positive? list.push(::Arke::Action.new(:order_create, @target, order: ::Arke::Order.new(@market, price, amount, side))) end diff --git a/lib/arke/strategy/copy.rb b/lib/arke/strategy/copy.rb index a9349a75..3061dbf5 100644 --- a/lib/arke/strategy/copy.rb +++ b/lib/arke/strategy/copy.rb @@ -52,7 +52,7 @@ def call price_points_asks = @side_asks ? split_constant_pp(:asks, top_ask.first, @levels_count, split_opts) : nil price_points_bids = @side_bids ? split_constant_pp(:bids, top_bid.first, @levels_count, split_opts) : nil - ob_agg = source.orderbook.aggregate(price_points_bids, price_points_asks, target.min_ask_amount, target.min_bid_amount) + ob_agg = source.orderbook.aggregate(price_points_bids, price_points_asks, target.min_amount) ob = ob_agg.to_ob limit_asks_quote = nil diff --git a/lib/arke/strategy/fixedprice.rb b/lib/arke/strategy/fixedprice.rb index dbaa0cd9..fb62e3d7 100644 --- a/lib/arke/strategy/fixedprice.rb +++ b/lib/arke/strategy/fixedprice.rb @@ -60,14 +60,14 @@ def call volume_asks_base = 0.to_d volume_bids_base = 0.to_d - max_amount_ask = 2.to_d * @limit_asks_base / @levels_count - 2 * target.min_ask_amount - max_amount_bid = 2.to_d * @limit_bids_base / @levels_count - 2 * target.min_bid_amount + max_amount_ask = 2.to_d * @limit_asks_base / @levels_count - 2 * target.min_amount + max_amount_bid = 2.to_d * @limit_bids_base / @levels_count - 2 * target.min_amount - max_amount_ask = target.min_ask_amount if max_amount_ask.negative? - max_amount_bid = target.min_bid_amount if max_amount_bid.negative? + max_amount_ask = target.min_amount if max_amount_ask.negative? + max_amount_bid = target.min_amount if max_amount_bid.negative? - ask_amounts = split_linear(nil, max_amount_ask, @levels_count, last_value: target.min_ask_amount) - bid_amounts = split_linear(nil, max_amount_bid, @levels_count, last_value: target.min_bid_amount) + ask_amounts = split_linear(nil, max_amount_ask, @levels_count, last_value: target.min_amount) + bid_amounts = split_linear(nil, max_amount_bid, @levels_count, last_value: target.min_amount) ob_asks = price_points_asks.map do |pp| amount = ask_amounts.shift diff --git a/lib/arke/strategy/microtrades.rb b/lib/arke/strategy/microtrades.rb index 2bcd2798..d4b062f3 100644 --- a/lib/arke/strategy/microtrades.rb +++ b/lib/arke/strategy/microtrades.rb @@ -13,8 +13,7 @@ class EmptyOrderBook < StandardError; end def initialize(sources, target, config, reactor) super params = @config["params"] || {} - market_infos = target.account.get_market_infos(target.id) - @min_amount = (params["min_amount"] || target_min_amount(market_infos)).to_f + @min_amount = (params["min_amount"] || target.min_amount) @max_amount = (params["max_amount"] || @min_amount * 2).to_f @min_price = params["min_price"] @max_price = params["max_price"] @@ -22,7 +21,6 @@ def initialize(sources, target, config, reactor) @enable_orderback = false @sides = SIDES_MAP[@side] check_config - logger.info "ID:#{id} Market infos: #{market_infos}" logger.info "ID:#{id} Min amount: #{@min_amount}" logger.info "ID:#{id} Max amount: #{@max_amount}" end @@ -39,15 +37,15 @@ def delay_the_first_execute def target_min_amount(market_infos) [ - market_infos["min_ask_amount"], - market_infos["min_bid_amount"], - target.min_ask_amount, - target.min_bid_amount, + market_infos["min_amount"], + market_infos["min_amount"], + target.min_amount, + target.min_amount, ].map(&:to_f).reject(&:zero?).min end def get_amount(side) - side_min_value = side == :sell ? target.min_ask_amount.to_f : target.min_bid_amount.to_f + side_min_value = side == :sell ? target.min_amount.to_f : target.min_amount.to_f amount = rand(@min_amount..@max_amount) if @linked_strategy_id linked_target = @reactor.find_strategy(@linked_strategy_id).target @@ -55,7 +53,7 @@ def get_amount(side) side_amount = linked_target.open_orders.total_side_amount(side) amount = (side_amount * 0.6) > amount ? amount : (side_amount * 0.6) end - apply_precision(amount, target.base_precision.to_f, side_min_value) + apply_precision(amount, target.amount_precision.to_f, side_min_value) end def get_price(side) @@ -73,7 +71,7 @@ def get_price(side) else price = side == :buy ? @max_price : @min_price end - apply_precision(price, target.quote_precision.to_f) + apply_precision(price, target.price_precision.to_f) end def call diff --git a/lib/arke/strategy/orderback.rb b/lib/arke/strategy/orderback.rb index 01cce98c..53da864d 100644 --- a/lib/arke/strategy/orderback.rb +++ b/lib/arke/strategy/orderback.rb @@ -47,7 +47,7 @@ def check_config raise "side must be asks, bids or both" if !@side_asks && !@side_bids if @enable_orderback - if @min_order_back_amount < target.min_ask_amount || @min_order_back_amount < target.min_bid_amount + if @min_order_back_amount < target.min_amount || @min_order_back_amount < target.min_amount raise "min_order_back_amount is too small" end end @@ -137,8 +137,7 @@ def call ob_agg = source.orderbook.aggregate( price_points_bids, price_points_asks, - target.min_ask_amount, - target.min_bid_amount + target.min_amount ) ob = ob_agg.to_ob diff --git a/spec/fixtures/files/kraken-assets.json b/spec/fixtures/files/kraken-assets.json new file mode 100644 index 00000000..8d39d0a7 --- /dev/null +++ b/spec/fixtures/files/kraken-assets.json @@ -0,0 +1,11524 @@ +{ + "error": [], + "result": { + "ADACAD": { + "altname": "ADACAD", + "wsname": "ADA\/CAD", + "aclass_base": "currency", + "base": "ADA", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ADAETH": { + "altname": "ADAETH", + "wsname": "ADA\/ETH", + "aclass_base": "currency", + "base": "ADA", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ADAEUR": { + "altname": "ADAEUR", + "wsname": "ADA\/EUR", + "aclass_base": "currency", + "base": "ADA", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ADAUSD": { + "altname": "ADAUSD", + "wsname": "ADA\/USD", + "aclass_base": "currency", + "base": "ADA", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ADAXBT": { + "altname": "ADAXBT", + "wsname": "ADA\/XBT", + "aclass_base": "currency", + "base": "ADA", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ATOMCAD": { + "altname": "ATOMCAD", + "wsname": "ATOM\/CAD", + "aclass_base": "currency", + "base": "ATOM", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ATOMETH": { + "altname": "ATOMETH", + "wsname": "ATOM\/ETH", + "aclass_base": "currency", + "base": "ATOM", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ATOMEUR": { + "altname": "ATOMEUR", + "wsname": "ATOM\/EUR", + "aclass_base": "currency", + "base": "ATOM", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ATOMUSD": { + "altname": "ATOMUSD", + "wsname": "ATOM\/USD", + "aclass_base": "currency", + "base": "ATOM", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ATOMXBT": { + "altname": "ATOMXBT", + "wsname": "ATOM\/XBT", + "aclass_base": "currency", + "base": "ATOM", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "BATETH": { + "altname": "BATETH", + "wsname": "BAT\/ETH", + "aclass_base": "currency", + "base": "BAT", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "BATEUR": { + "altname": "BATEUR", + "wsname": "BAT\/EUR", + "aclass_base": "currency", + "base": "BAT", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "BATUSD": { + "altname": "BATUSD", + "wsname": "BAT\/USD", + "aclass_base": "currency", + "base": "BAT", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "BATXBT": { + "altname": "BATXBT", + "wsname": "BAT\/XBT", + "aclass_base": "currency", + "base": "BAT", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "BCHEUR": { + "altname": "BCHEUR", + "wsname": "BCH\/EUR", + "aclass_base": "currency", + "base": "BCH", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 1, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3 + ], + "leverage_sell": [ + 2, + 3 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "BCHUSD": { + "altname": "BCHUSD", + "wsname": "BCH\/USD", + "aclass_base": "currency", + "base": "BCH", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 1, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3 + ], + "leverage_sell": [ + 2, + 3 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "BCHXBT": { + "altname": "BCHXBT", + "wsname": "BCH\/XBT", + "aclass_base": "currency", + "base": "BCH", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "DAIEUR": { + "altname": "DAIEUR", + "wsname": "DAI\/EUR", + "aclass_base": "currency", + "base": "DAI", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.2 + ], + [ + 50000, + 0.16 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.08 + ], + [ + 500000, + 0.04 + ], + [ + 1000000, + 0 + ] + ], + "fees_maker": [ + [ + 0, + 0.2 + ], + [ + 50000, + 0.16 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.08 + ], + [ + 500000, + 0.04 + ], + [ + 1000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "DAIUSD": { + "altname": "DAIUSD", + "wsname": "DAI\/USD", + "aclass_base": "currency", + "base": "DAI", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.2 + ], + [ + 50000, + 0.16 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.08 + ], + [ + 500000, + 0.04 + ], + [ + 1000000, + 0 + ] + ], + "fees_maker": [ + [ + 0, + 0.2 + ], + [ + 50000, + 0.16 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.08 + ], + [ + 500000, + 0.04 + ], + [ + 1000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "DAIUSDT": { + "altname": "DAIUSDT", + "wsname": "DAI\/USDT", + "aclass_base": "currency", + "base": "DAI", + "aclass_quote": "currency", + "quote": "USDT", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.2 + ], + [ + 50000, + 0.16 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.08 + ], + [ + 500000, + 0.04 + ], + [ + 1000000, + 0 + ] + ], + "fees_maker": [ + [ + 0, + 0.2 + ], + [ + 50000, + 0.16 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.08 + ], + [ + 500000, + 0.04 + ], + [ + 1000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "DASHEUR": { + "altname": "DASHEUR", + "wsname": "DASH\/EUR", + "aclass_base": "currency", + "base": "DASH", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "DASHUSD": { + "altname": "DASHUSD", + "wsname": "DASH\/USD", + "aclass_base": "currency", + "base": "DASH", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "DASHXBT": { + "altname": "DASHXBT", + "wsname": "DASH\/XBT", + "aclass_base": "currency", + "base": "DASH", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "EOSETH": { + "altname": "EOSETH", + "wsname": "EOS\/ETH", + "aclass_base": "currency", + "base": "EOS", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "EOSEUR": { + "altname": "EOSEUR", + "wsname": "EOS\/EUR", + "aclass_base": "currency", + "base": "EOS", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "EOSUSD": { + "altname": "EOSUSD", + "wsname": "EOS\/USD", + "aclass_base": "currency", + "base": "EOS", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "EOSXBT": { + "altname": "EOSXBT", + "wsname": "EOS\/XBT", + "aclass_base": "currency", + "base": "EOS", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ETHCHF": { + "altname": "ETHCHF", + "wsname": "ETH\/CHF", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "CHF", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ETHDAI": { + "altname": "ETHDAI", + "wsname": "ETH\/DAI", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "DAI", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "GNOETH": { + "altname": "GNOETH", + "wsname": "GNO\/ETH", + "aclass_base": "currency", + "base": "GNO", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "GNOEUR": { + "altname": "GNOEUR", + "wsname": "GNO\/EUR", + "aclass_base": "currency", + "base": "GNO", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "GNOUSD": { + "altname": "GNOUSD", + "wsname": "GNO\/USD", + "aclass_base": "currency", + "base": "GNO", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "GNOXBT": { + "altname": "GNOXBT", + "wsname": "GNO\/XBT", + "aclass_base": "currency", + "base": "GNO", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ICXETH": { + "altname": "ICXETH", + "wsname": "ICX\/ETH", + "aclass_base": "currency", + "base": "ICX", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ICXEUR": { + "altname": "ICXEUR", + "wsname": "ICX\/EUR", + "aclass_base": "currency", + "base": "ICX", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ICXUSD": { + "altname": "ICXUSD", + "wsname": "ICX\/USD", + "aclass_base": "currency", + "base": "ICX", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "ICXXBT": { + "altname": "ICXXBT", + "wsname": "ICX\/XBT", + "aclass_base": "currency", + "base": "ICX", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "LINKETH": { + "altname": "LINKETH", + "wsname": "LINK\/ETH", + "aclass_base": "currency", + "base": "LINK", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "LINKEUR": { + "altname": "LINKEUR", + "wsname": "LINK\/EUR", + "aclass_base": "currency", + "base": "LINK", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "LINKUSD": { + "altname": "LINKUSD", + "wsname": "LINK\/USD", + "aclass_base": "currency", + "base": "LINK", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "LINKXBT": { + "altname": "LINKXBT", + "wsname": "LINK\/XBT", + "aclass_base": "currency", + "base": "LINK", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "LSKETH": { + "altname": "LSKETH", + "wsname": "LSK\/ETH", + "aclass_base": "currency", + "base": "LSK", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "LSKEUR": { + "altname": "LSKEUR", + "wsname": "LSK\/EUR", + "aclass_base": "currency", + "base": "LSK", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "LSKUSD": { + "altname": "LSKUSD", + "wsname": "LSK\/USD", + "aclass_base": "currency", + "base": "LSK", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "LSKXBT": { + "altname": "LSKXBT", + "wsname": "LSK\/XBT", + "aclass_base": "currency", + "base": "LSK", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 9, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "NANOETH": { + "altname": "NANOETH", + "wsname": "NANO\/ETH", + "aclass_base": "currency", + "base": "NANO", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "NANOEUR": { + "altname": "NANOEUR", + "wsname": "NANO\/EUR", + "aclass_base": "currency", + "base": "NANO", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "NANOUSD": { + "altname": "NANOUSD", + "wsname": "NANO\/USD", + "aclass_base": "currency", + "base": "NANO", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "NANOXBT": { + "altname": "NANOXBT", + "wsname": "NANO\/XBT", + "aclass_base": "currency", + "base": "NANO", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 9, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "OMGETH": { + "altname": "OMGETH", + "wsname": "OMG\/ETH", + "aclass_base": "currency", + "base": "OMG", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "OMGEUR": { + "altname": "OMGEUR", + "wsname": "OMG\/EUR", + "aclass_base": "currency", + "base": "OMG", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "OMGUSD": { + "altname": "OMGUSD", + "wsname": "OMG\/USD", + "aclass_base": "currency", + "base": "OMG", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "OMGXBT": { + "altname": "OMGXBT", + "wsname": "OMG\/XBT", + "aclass_base": "currency", + "base": "OMG", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 9, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "PAXGETH": { + "altname": "PAXGETH", + "wsname": "PAXG\/ETH", + "aclass_base": "currency", + "base": "PAXG", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "PAXGEUR": { + "altname": "PAXGEUR", + "wsname": "PAXG\/EUR", + "aclass_base": "currency", + "base": "PAXG", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "PAXGUSD": { + "altname": "PAXGUSD", + "wsname": "PAXG\/USD", + "aclass_base": "currency", + "base": "PAXG", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "PAXGXBT": { + "altname": "PAXGXBT", + "wsname": "PAXG\/XBT", + "aclass_base": "currency", + "base": "PAXG", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "QTUMCAD": { + "altname": "QTUMCAD", + "wsname": "QTUM\/CAD", + "aclass_base": "currency", + "base": "QTUM", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "QTUMETH": { + "altname": "QTUMETH", + "wsname": "QTUM\/ETH", + "aclass_base": "currency", + "base": "QTUM", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "QTUMEUR": { + "altname": "QTUMEUR", + "wsname": "QTUM\/EUR", + "aclass_base": "currency", + "base": "QTUM", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "QTUMUSD": { + "altname": "QTUMUSD", + "wsname": "QTUM\/USD", + "aclass_base": "currency", + "base": "QTUM", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "QTUMXBT": { + "altname": "QTUMXBT", + "wsname": "QTUM\/XBT", + "aclass_base": "currency", + "base": "QTUM", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "SCETH": { + "altname": "SCETH", + "wsname": "SC\/ETH", + "aclass_base": "currency", + "base": "SC", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "SCEUR": { + "altname": "SCEUR", + "wsname": "SC\/EUR", + "aclass_base": "currency", + "base": "SC", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "SCUSD": { + "altname": "SCUSD", + "wsname": "SC\/USD", + "aclass_base": "currency", + "base": "SC", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "SCXBT": { + "altname": "SCXBT", + "wsname": "SC\/XBT", + "aclass_base": "currency", + "base": "SC", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 10, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "USDTZUSD": { + "altname": "USDTUSD", + "wsname": "USDT\/USD", + "aclass_base": "currency", + "base": "USDT", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.2 + ], + [ + 50000, + 0.16 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.08 + ], + [ + 500000, + 0.04 + ], + [ + 1000000, + 0 + ] + ], + "fees_maker": [ + [ + 0, + 0.2 + ], + [ + 50000, + 0.16 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.08 + ], + [ + 500000, + 0.04 + ], + [ + 1000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "WAVESETH": { + "altname": "WAVESETH", + "wsname": "WAVES\/ETH", + "aclass_base": "currency", + "base": "WAVES", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "WAVESEUR": { + "altname": "WAVESEUR", + "wsname": "WAVES\/EUR", + "aclass_base": "currency", + "base": "WAVES", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "WAVESUSD": { + "altname": "WAVESUSD", + "wsname": "WAVES\/USD", + "aclass_base": "currency", + "base": "WAVES", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "WAVESXBT": { + "altname": "WAVESXBT", + "wsname": "WAVES\/XBT", + "aclass_base": "currency", + "base": "WAVES", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XBTCHF": { + "altname": "XBTCHF", + "wsname": "XBT\/CHF", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "CHF", + "lot": "unit", + "pair_decimals": 1, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETCXETH": { + "altname": "ETCETH", + "wsname": "ETC\/ETH", + "aclass_base": "currency", + "base": "XETC", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETCXXBT": { + "altname": "ETCXBT", + "wsname": "ETC\/XBT", + "aclass_base": "currency", + "base": "XETC", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3 + ], + "leverage_sell": [ + 2, + 3 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETCZEUR": { + "altname": "ETCEUR", + "wsname": "ETC\/EUR", + "aclass_base": "currency", + "base": "XETC", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETCZUSD": { + "altname": "ETCUSD", + "wsname": "ETC\/USD", + "aclass_base": "currency", + "base": "XETC", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHXXBT": { + "altname": "ETHXBT", + "wsname": "ETH\/XBT", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3, + 4, + 5 + ], + "leverage_sell": [ + 2, + 3, + 4, + 5 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHXXBT.d": { + "altname": "ETHXBT.d", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZCAD": { + "altname": "ETHCAD", + "wsname": "ETH\/CAD", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZCAD.d": { + "altname": "ETHCAD.d", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZEUR": { + "altname": "ETHEUR", + "wsname": "ETH\/EUR", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3, + 4, + 5 + ], + "leverage_sell": [ + 2, + 3, + 4, + 5 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZEUR.d": { + "altname": "ETHEUR.d", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZGBP": { + "altname": "ETHGBP", + "wsname": "ETH\/GBP", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZGBP", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZGBP.d": { + "altname": "ETHGBP.d", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZGBP", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZJPY": { + "altname": "ETHJPY", + "wsname": "ETH\/JPY", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZJPY", + "lot": "unit", + "pair_decimals": 0, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZJPY.d": { + "altname": "ETHJPY.d", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZJPY", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZUSD": { + "altname": "ETHUSD", + "wsname": "ETH\/USD", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3, + 4, + 5 + ], + "leverage_sell": [ + 2, + 3, + 4, + 5 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XETHZUSD.d": { + "altname": "ETHUSD.d", + "aclass_base": "currency", + "base": "XETH", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XLTCXXBT": { + "altname": "LTCXBT", + "wsname": "LTC\/XBT", + "aclass_base": "currency", + "base": "XLTC", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XLTCZEUR": { + "altname": "LTCEUR", + "wsname": "LTC\/EUR", + "aclass_base": "currency", + "base": "XLTC", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XLTCZUSD": { + "altname": "LTCUSD", + "wsname": "LTC\/USD", + "aclass_base": "currency", + "base": "XLTC", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XMLNXETH": { + "altname": "MLNETH", + "wsname": "MLN\/ETH", + "aclass_base": "currency", + "base": "XMLN", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XMLNXXBT": { + "altname": "MLNXBT", + "wsname": "MLN\/XBT", + "aclass_base": "currency", + "base": "XMLN", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XREPXETH": { + "altname": "REPETH", + "wsname": "REP\/ETH", + "aclass_base": "currency", + "base": "XREP", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XREPXXBT": { + "altname": "REPXBT", + "wsname": "REP\/XBT", + "aclass_base": "currency", + "base": "XREP", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XREPZEUR": { + "altname": "REPEUR", + "wsname": "REP\/EUR", + "aclass_base": "currency", + "base": "XREP", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XREPZUSD": { + "altname": "REPUSD", + "wsname": "REP\/USD", + "aclass_base": "currency", + "base": "XREP", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XTZCAD": { + "altname": "XTZCAD", + "wsname": "XTZ\/CAD", + "aclass_base": "currency", + "base": "XTZ", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XTZETH": { + "altname": "XTZETH", + "wsname": "XTZ\/ETH", + "aclass_base": "currency", + "base": "XTZ", + "aclass_quote": "currency", + "quote": "XETH", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XTZEUR": { + "altname": "XTZEUR", + "wsname": "XTZ\/EUR", + "aclass_base": "currency", + "base": "XTZ", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XTZUSD": { + "altname": "XTZUSD", + "wsname": "XTZ\/USD", + "aclass_base": "currency", + "base": "XTZ", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 4, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XTZXBT": { + "altname": "XTZXBT", + "wsname": "XTZ\/XBT", + "aclass_base": "currency", + "base": "XTZ", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 7, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZCAD": { + "altname": "XBTCAD", + "wsname": "XBT\/CAD", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 1, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZCAD.d": { + "altname": "XBTCAD.d", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZEUR": { + "altname": "XBTEUR", + "wsname": "XBT\/EUR", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 1, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3, + 4, + 5 + ], + "leverage_sell": [ + 2, + 3, + 4, + 5 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZEUR.d": { + "altname": "XBTEUR.d", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZGBP": { + "altname": "XBTGBP", + "wsname": "XBT\/GBP", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZGBP", + "lot": "unit", + "pair_decimals": 1, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZGBP.d": { + "altname": "XBTGBP.d", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZGBP", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZJPY": { + "altname": "XBTJPY", + "wsname": "XBT\/JPY", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZJPY", + "lot": "unit", + "pair_decimals": 0, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZJPY.d": { + "altname": "XBTJPY.d", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZJPY", + "lot": "unit", + "pair_decimals": 1, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZUSD": { + "altname": "XBTUSD", + "wsname": "XBT\/USD", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 1, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3, + 4, + 5 + ], + "leverage_sell": [ + 2, + 3, + 4, + 5 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXBTZUSD.d": { + "altname": "XBTUSD.d", + "aclass_base": "currency", + "base": "XXBT", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.36 + ], + [ + 50000, + 0.34 + ], + [ + 100000, + 0.32 + ], + [ + 250000, + 0.3 + ], + [ + 500000, + 0.28 + ], + [ + 1000000, + 0.26 + ], + [ + 2500000, + 0.24 + ], + [ + 5000000, + 0.22 + ], + [ + 10000000, + 0.2 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXDGXXBT": { + "altname": "XDGXBT", + "wsname": "XDG\/XBT", + "aclass_base": "currency", + "base": "XXDG", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXLMXXBT": { + "altname": "XLMXBT", + "wsname": "XLM\/XBT", + "aclass_base": "currency", + "base": "XXLM", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXLMZEUR": { + "altname": "XLMEUR", + "wsname": "XLM\/EUR", + "aclass_base": "currency", + "base": "XXLM", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXLMZUSD": { + "altname": "XLMUSD", + "wsname": "XLM\/USD", + "aclass_base": "currency", + "base": "XXLM", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXMRXXBT": { + "altname": "XMRXBT", + "wsname": "XMR\/XBT", + "aclass_base": "currency", + "base": "XXMR", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 6, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3 + ], + "leverage_sell": [ + 2, + 3 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXMRZEUR": { + "altname": "XMREUR", + "wsname": "XMR\/EUR", + "aclass_base": "currency", + "base": "XXMR", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXMRZUSD": { + "altname": "XMRUSD", + "wsname": "XMR\/USD", + "aclass_base": "currency", + "base": "XXMR", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2 + ], + "leverage_sell": [ + 2 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXRPXXBT": { + "altname": "XRPXBT", + "wsname": "XRP\/XBT", + "aclass_base": "currency", + "base": "XXRP", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 8, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3 + ], + "leverage_sell": [ + 2, + 3 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXRPZCAD": { + "altname": "XRPCAD", + "wsname": "XRP\/CAD", + "aclass_base": "currency", + "base": "XXRP", + "aclass_quote": "currency", + "quote": "ZCAD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXRPZEUR": { + "altname": "XRPEUR", + "wsname": "XRP\/EUR", + "aclass_base": "currency", + "base": "XXRP", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3, + 4, + 5 + ], + "leverage_sell": [ + 2, + 3, + 4, + 5 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXRPZJPY": { + "altname": "XRPJPY", + "wsname": "XRP\/JPY", + "aclass_base": "currency", + "base": "XXRP", + "aclass_quote": "currency", + "quote": "ZJPY", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XXRPZUSD": { + "altname": "XRPUSD", + "wsname": "XRP\/USD", + "aclass_base": "currency", + "base": "XXRP", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [ + 2, + 3, + 4, + 5 + ], + "leverage_sell": [ + 2, + 3, + 4, + 5 + ], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XZECXXBT": { + "altname": "ZECXBT", + "wsname": "ZEC\/XBT", + "aclass_base": "currency", + "base": "XZEC", + "aclass_quote": "currency", + "quote": "XXBT", + "lot": "unit", + "pair_decimals": 5, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XZECZEUR": { + "altname": "ZECEUR", + "wsname": "ZEC\/EUR", + "aclass_base": "currency", + "base": "XZEC", + "aclass_quote": "currency", + "quote": "ZEUR", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XZECZJPY": { + "altname": "ZECJPY", + "wsname": "ZEC\/JPY", + "aclass_base": "currency", + "base": "XZEC", + "aclass_quote": "currency", + "quote": "ZJPY", + "lot": "unit", + "pair_decimals": 3, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + }, + "XZECZUSD": { + "altname": "ZECUSD", + "wsname": "ZEC\/USD", + "aclass_base": "currency", + "base": "XZEC", + "aclass_quote": "currency", + "quote": "ZUSD", + "lot": "unit", + "pair_decimals": 2, + "lot_decimals": 8, + "lot_multiplier": 1, + "leverage_buy": [], + "leverage_sell": [], + "fees": [ + [ + 0, + 0.26 + ], + [ + 50000, + 0.24 + ], + [ + 100000, + 0.22 + ], + [ + 250000, + 0.2 + ], + [ + 500000, + 0.18 + ], + [ + 1000000, + 0.16 + ], + [ + 2500000, + 0.14 + ], + [ + 5000000, + 0.12 + ], + [ + 10000000, + 0.1 + ] + ], + "fees_maker": [ + [ + 0, + 0.16 + ], + [ + 50000, + 0.14 + ], + [ + 100000, + 0.12 + ], + [ + 250000, + 0.1 + ], + [ + 500000, + 0.08 + ], + [ + 1000000, + 0.06 + ], + [ + 2500000, + 0.04 + ], + [ + 5000000, + 0.02 + ], + [ + 10000000, + 0 + ] + ], + "fee_volume_currency": "ZUSD", + "margin_call": 80, + "margin_stop": 40 + } + } +} \ No newline at end of file diff --git a/spec/lib/arke/exchange/base_spec.rb b/spec/lib/arke/exchange/base_spec.rb index b2138bae..58292494 100644 --- a/spec/lib/arke/exchange/base_spec.rb +++ b/spec/lib/arke/exchange/base_spec.rb @@ -8,13 +8,7 @@ let(:market_config) do { - "market" => { - "id" => "ETHUSDt", - "base" => "ETH", - "quote" => "USDT", - "min_ask_amount" => 0.01, - "min_bid_amount" => 0.01, - }, + "market" => {"id" => "ETHUSDt"}, } end diff --git a/spec/lib/arke/exchange/binance_spec.rb b/spec/lib/arke/exchange/binance_spec.rb index dc4678ca..bfe75eee 100644 --- a/spec/lib/arke/exchange/binance_spec.rb +++ b/spec/lib/arke/exchange/binance_spec.rb @@ -5,11 +5,7 @@ let(:market_config) do { - "id" => "ETHUSDT", - "base" => "ETH", - "quote" => "USDT", - "min_ask_amount" => 0.01, - "min_bid_amount" => 0.01, + "id" => "ETHUSDT" } end @@ -282,4 +278,19 @@ binance.ws_read_message(:public, trade_event) end end + + context "market_config" do + it "returns market configuration" do + expect(binance.market_config("ETHUSDT")).to eq( + "id" => "ETHUSDT", + "base_unit" => "ETH", + "quote_unit" => "USDT", + "min_price" => 0.01, + "max_price" => 10_000_000, + "min_amount" => 0.00001, + "amount_precision" => 8, + "price_precision" => 8 + ) + end + end end diff --git a/spec/lib/arke/exchange/bitfinex_spec.rb b/spec/lib/arke/exchange/bitfinex_spec.rb index 9b0a3ebe..d26c4a61 100644 --- a/spec/lib/arke/exchange/bitfinex_spec.rb +++ b/spec/lib/arke/exchange/bitfinex_spec.rb @@ -6,11 +6,7 @@ let(:config) { YAML.safe_load(file_fixture("test_config.yaml").read) } let(:market_config) do { - "id" => "ETHUSD", - "base" => "ETH", - "quote" => "USD", - "min_ask_amount" => 0.01, - "min_bid_amount" => 0.01, + "id" => "ETHUSD" } end let(:bitfinex_config) do diff --git a/spec/lib/arke/exchange/hitbtc_spec.rb b/spec/lib/arke/exchange/hitbtc_spec.rb index 4a269653..a6f41183 100644 --- a/spec/lib/arke/exchange/hitbtc_spec.rb +++ b/spec/lib/arke/exchange/hitbtc_spec.rb @@ -11,11 +11,7 @@ end let(:market_config) do { - "id" => "ETHUSD", - "base" => "ETH", - "quote" => "USD", - "min_ask_amount" => 0.01, - "min_bid_amount" => 0.01, + "id" => "ETHUSD" } end let!(:market) { Arke::Market.new(market_config, hitbtc) } @@ -73,6 +69,21 @@ end end + context "market_config" do + it "returns market config" do + expect(hitbtc.market_config("ETHBTC")).to eq( + "id" => "ETHBTC", + "base_unit" => "ETH", + "quote_unit" => "BTC", + "min_price" => nil, + "max_price" => nil, + "min_amount" => 0.001, + "amount_precision" => 3, + "price_precision" => 6 + ) + end + end + context "create_order" do let(:order) { Arke::Order.new("ETHUSD", 1180.00, 0.10, :sell) } diff --git a/spec/lib/arke/exchange/huobi_spec.rb b/spec/lib/arke/exchange/huobi_spec.rb index 32ad3257..5e703e48 100644 --- a/spec/lib/arke/exchange/huobi_spec.rb +++ b/spec/lib/arke/exchange/huobi_spec.rb @@ -11,18 +11,11 @@ "host" => "api.huobi.pro", "key" => "Uwg8wqlxueiLCsbTXjlogviL8hdd60", "secret" => "OwpadzSYOSkzweoJkjPrFeVgjOwOuxVHk8FXIlffdWw", - :faraday_adapter => faraday_adapter + :faraday_adapter => faraday_adapter, + "ts_pattern" => "%Y-%m-%dT%H" ) end - let(:market_config) do - { - "id" => "ETHUSDT", - "base" => "ETH", - "quote" => "USDT", - "min_ask_amount" => 0.01, - "min_bid_amount" => 0.01, - } - end + let(:market_config) { {"id" => "ethusdt"} } let!(:market) { Arke::Market.new(market_config, huobi) } context "ojbect initialization" do @@ -94,22 +87,40 @@ end end + context "market_config" do + it "returns market config" do + expect(huobi.market_config("btcusdt")).to eq( + "id" => "btcusdt", + "base_unit" => "btc", + "quote_unit" => "usdt", + "min_price" => nil, + "max_price" => nil, + "min_amount" => 0.0001, + "max_amount" => 1000, + "amount_precision" => 6, + "price_precision" => 2 + ) + end + end + context "get_balances" do it "fetchs the account balance in arke format" do - expect(huobi.get_balances).to eq([ - { - "currency" => "USDT", - "total" => 155.0, - "free" => 123.0, - "locked" => 32.0, - }, - { - "currency" => "ETH", - "total" => 499_999_894_616.1302471000, - "free" => 499_999_894_616.1302471000, - "locked" => 0.0, - } - ]) + expect(huobi.get_balances).to eq( + [ + { + "currency" => "USDT", + "total" => 155.0, + "free" => 123.0, + "locked" => 32.0, + }, + { + "currency" => "ETH", + "total" => 499_999_894_616.1302471000, + "free" => 499_999_894_616.1302471000, + "locked" => 0.0, + } + ] + ) end end diff --git a/spec/lib/arke/exchange/kraken_spec.rb b/spec/lib/arke/exchange/kraken_spec.rb new file mode 100644 index 00000000..6e3d0f75 --- /dev/null +++ b/spec/lib/arke/exchange/kraken_spec.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +describe Arke::Exchange::Kraken do + include_context "mocked kraken" + let(:exchange_config) do + { + "driver" => "kraken", + } + end + let(:kraken) { Arke::Exchange::Kraken.new(exchange_config) } + let(:market_config) { {"id" => "XBTUSD"} } + let!(:market) { Arke::Market.new(market_config, kraken) } + + context "market_config" do + it "returns market configuration" do + expect(kraken.market_config("XBTUSD")).to eq( + "id" => "XBTUSD", + "base_unit" => "XXBT", + "quote_unit" => "ZUSD", + "min_price" => nil, + "max_price" => nil, + "min_amount" => nil, + "amount_precision" => 8, + "price_precision" => 1 + ) + end + end +end diff --git a/spec/lib/arke/exchange/luno_spec.rb b/spec/lib/arke/exchange/luno_spec.rb index 862a7e98..987bcdac 100644 --- a/spec/lib/arke/exchange/luno_spec.rb +++ b/spec/lib/arke/exchange/luno_spec.rb @@ -10,11 +10,7 @@ end let(:market_config) do { - "id" => "XBTZAR", - "base" => "XBT", - "quote" => "ZAR", - "min_ask_amount" => 0.001, - "min_bid_amount" => 0.001, + "id" => "XBTZAR" } end let!(:market) { Arke::Market.new(market_config, luno) } @@ -75,4 +71,20 @@ expect { luno.create_order(order) }.to_not raise_error(Exception) end end + + context "market_config" do + it "returns market configuration" do + expect(luno.market_config("ETHZAR")).to eq( + "id" => "ETHZAR", + "base_unit" => "ETH", + "quote_unit" => "ZAR", + "min_price" => 1000.0, + "max_price" => 10_000.0, + "min_amount" => 0.0005, + "max_amount" => 100.0, + "amount_precision" => 6.0, + "price_precision" => 0.0 + ) + end + end end diff --git a/spec/lib/arke/exchange/rubykube_spec.rb b/spec/lib/arke/exchange/rubykube_spec.rb index cdbdf019..af319ae4 100644 --- a/spec/lib/arke/exchange/rubykube_spec.rb +++ b/spec/lib/arke/exchange/rubykube_spec.rb @@ -16,17 +16,7 @@ end let!(:market) { Arke::Market.new(market_config, rubykube) } - - let(:market_config) do - { - "id" => "ETHUSD", - "base" => "ETH", - "quote" => "USD", - "min_ask_amount" => 0.01, - "min_bid_amount" => 0.01, - } - end - + let(:market_config) { {"id" => "ethusd"} } let(:strategy) { Arke::Strategy::Copy.new(strategy_config) } let(:order) { Arke::Order.new("ethusd", 1, 1, :buy) } let(:rubykube) { Arke::Exchange::Rubykube.new(exchange_config) } @@ -69,6 +59,174 @@ end end + context "rubykube#market_config after peatio 2.2.14" do + it "generates market configuration" do + expect(rubykube.market_config("btcusd")).to eq( + "id" => "btcusd", + "base_unit" => "btc", + "quote_unit" => "usd", + "min_price" => 100.0, + "max_price" => 100_000.0, + "min_amount" => 0.0005, + "amount_precision" => 6, + "price_precision" => 2 + ) + end + end + + context "rubykube#market_config before peatio 2.2.14" do + it "generates market configuration" do + stub_request(:get, %r{peatio/public/markets}) + .to_return( + status: 200, + body: [ + { + "id" => "btcusd", + "name" => "BTC/USD", + "ask_unit" => "btc", + "bid_unit" => "usd", + "min_ask_price" => "100.0", + "max_bid_price" => "100000.0", + "min_ask_amount" => "0.0005", + "min_bid_amount" => "0.0005", + "ask_precision" => 6, + "bid_precision" => 2 + } + ].to_json, + headers: {} + ) + expect(rubykube.market_config("btcusd")).to eq( + "id" => "btcusd", + "base_unit" => "btc", + "quote_unit" => "usd", + "min_price" => 100, + "max_price" => 100_000, + "min_amount" => 0.0005, + "amount_precision" => 6, + "price_precision" => 2 + ) + end + end + + context "rubykube#market_config misconfiguration" do + it "doesn't raise error for missing non required fields" do + stub_request(:get, %r{peatio/public/markets}) + .to_return( + status: 200, + body: [ + { + "id" => "btcusd", + "base_unit" => "btc", + "quote_unit" => "usd", + "amount_precision" => 6, + "price_precision" => 2, + "state" => "enabled" + } + ].to_json, + headers: {} + ) + expect(rubykube.market_config("btcusd")).to eq( + "id" => "btcusd", + "base_unit" => "btc", + "quote_unit" => "usd", + "min_price" => nil, + "max_price" => nil, + "min_amount" => nil, + "amount_precision" => 6, + "price_precision" => 2 + ) + end + + it "raises error if id is missing" do + stub_request(:get, %r{peatio/public/markets}) + .to_return( + status: 200, + body: [ + { + "base_unit" => "btc", + "quote_unit" => "usd", + "amount_precision" => 6, + "price_precision" => 2 + } + ].to_json, + headers: {} + ) + expect { rubykube.market_config("btcusd") }.to raise_error("Market btcusd not found") + end + + it "raises error if base_unit is missing" do + stub_request(:get, %r{peatio/public/markets}) + .to_return( + status: 200, + body: [ + { + "id" => "btcusd", + "quote_unit" => "usd", + "amount_precision" => 6, + "price_precision" => 2, + "state" => "enabled" + } + ].to_json, + headers: {} + ) + expect { rubykube.market_config("btcusd") }.to raise_error(/base_unit/) + end + + it "raises error if quote_unit is missing" do + stub_request(:get, %r{peatio/public/markets}) + .to_return( + status: 200, + body: [ + { + "id" => "btcusd", + "base_unit" => "btc", + "amount_precision" => 6, + "price_precision" => 2, + "state" => "enabled" + } + ].to_json, + headers: {} + ) + expect { rubykube.market_config("btcusd") }.to raise_error(/quote_unit/) + end + + it "raises error if amount_precision is missing" do + stub_request(:get, %r{peatio/public/markets}) + .to_return( + status: 200, + body: [ + { + "id" => "btcusd", + "base_unit" => "btc", + "quote_unit" => "usd", + "price_precision" => 2, + "state" => "enabled" + } + ].to_json, + headers: {} + ) + expect { rubykube.market_config("btcusd") }.to raise_error(/amount_precision/) + end + + it "raises error if price_precision is missing" do + stub_request(:get, %r{peatio/public/markets}) + .to_return( + status: 200, + body: [ + { + "id" => "btcusd", + "base_unit" => "btc", + "quote_unit" => "usd", + "amount_precision" => 6, + "state" => "enabled" + } + ].to_json, + headers: {} + ) + expect { rubykube.market_config("btcusd") }.to raise_error(/price_precision/) + end + end + context "rubykube#stop_order" do let(:order) { Arke::Order.new("ethusd", 1, 1, :buy, "limit", 42) } diff --git a/spec/lib/arke/helpers/precision_spec.rb b/spec/lib/arke/helpers/precision_spec.rb new file mode 100644 index 00000000..d90462e8 --- /dev/null +++ b/spec/lib/arke/helpers/precision_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +describe Arke::Helpers::Precision do + context "value_precision" do + include Arke::Helpers::Precision + + it "returns the precision from a value" do + expect(value_precision(0.1)).to eq(1) + expect(value_precision(0.01)).to eq(2) + expect(value_precision(0.001)).to eq(3) + expect(value_precision(0.000001)).to eq(6) + expect(value_precision(0)).to eq(0) + expect(value_precision(1)).to eq(0) + expect(value_precision(2)).to eq(0) + expect(value_precision(10)).to eq(-1) + expect(value_precision(100)).to eq(-2) + end + end +end diff --git a/spec/lib/arke/orderbook/aggregated_spec.rb b/spec/lib/arke/orderbook/aggregated_spec.rb index a4139eae..c899d46f 100644 --- a/spec/lib/arke/orderbook/aggregated_spec.rb +++ b/spec/lib/arke/orderbook/aggregated_spec.rb @@ -211,7 +211,7 @@ end it "aggregates complete orderbook" do - book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1, 0.1) + book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1) expect(book[:buy].to_hash).to eq( 6.0.to_d => {high_price: 6.to_d, low_price: 6.to_d, volume: 0.1.to_d, weighted_price: 6.to_d}, 8.5.to_d => {high_price: 9.to_d, low_price: 8.to_d, volume: 2.to_d, weighted_price: 8.5.to_d} @@ -227,7 +227,7 @@ end it "aggregates only bids side" do - book = orderbook.aggregate(price_points_buy, nil, nil, 0.1) + book = orderbook.aggregate(price_points_buy, nil, 0.1) expect(book[:buy].to_hash).to eq( 6.0.to_d => {high_price: 6.to_d, low_price: 6.to_d, volume: 0.1.to_d, weighted_price: 6.0.to_d}, 8.5.to_d => {high_price: 9.to_d, low_price: 8.to_d, volume: 2.0.to_d, weighted_price: 8.5.to_d} @@ -236,7 +236,7 @@ end it "aggregates only asks side" do - book = orderbook.aggregate(nil, price_points_sell, 0.1, nil) + book = orderbook.aggregate(nil, price_points_sell, 0.1) expect(book[:buy].to_hash).to eq({}) expect(book[:sell].to_hash).to eq( 4.0.to_d => {high_price: 5, low_price: 2, volume: 3, weighted_price: 4.0}, @@ -246,7 +246,7 @@ context "to_ob" do it "returns a Orderbook object" do - book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1, 0.1).to_ob + book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1).to_ob expect(book[:buy].to_hash).to eq( 6.0.to_d => 0.1.to_d, 8.5.to_d => 2.0.to_d diff --git a/spec/lib/arke/orderbook/orderbook_spec.rb b/spec/lib/arke/orderbook/orderbook_spec.rb index 517d9383..78b74b1a 100644 --- a/spec/lib/arke/orderbook/orderbook_spec.rb +++ b/spec/lib/arke/orderbook/orderbook_spec.rb @@ -102,7 +102,7 @@ end it "adjusts volume based on base volume requirements" do - book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1, 0.1) + book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1) .to_ob .adjust_volume(0.2, 0.3) expect(book[:buy].to_hash).to eq( @@ -120,7 +120,7 @@ end it "stops when reaching quote limit" do - book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1, 0.1) + book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1) .to_ob .adjust_volume(0.2, 0.3, 1.1, 1.2) expect(book[:buy].to_hash).to eq( @@ -137,7 +137,7 @@ end it "does nothing if the orderbook volume is lower than the provided limit" do - book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1, 0.1) + book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1) .to_ob .adjust_volume(4, 6) expect(book[:buy].to_hash).to eq( @@ -153,7 +153,7 @@ end it "does nothing if the limits are nil" do - book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1, 0.1) + book = orderbook.aggregate(price_points_buy, price_points_sell, 0.1) .to_ob .adjust_volume(nil, nil) expect(book[:buy].to_hash).to eq( diff --git a/spec/lib/arke/strategy/copy_spec.rb b/spec/lib/arke/strategy/copy_spec.rb index 8ea66e24..fb1538c8 100644 --- a/spec/lib/arke/strategy/copy_spec.rb +++ b/spec/lib/arke/strategy/copy_spec.rb @@ -3,6 +3,8 @@ require "rails_helper" describe Arke::Strategy::Copy do + include_context "mocked binance" + let!(:strategy) { Arke::Strategy::Copy.new([source], target, config, nil) } let(:source_account) { Arke::Exchange.create(source_config) } let(:target_account) { Arke::Exchange.create(target_config) } @@ -47,11 +49,7 @@ { "account_id" => 1, "market" => { - "id" => "BTCUSD", - "base" => "BTC", - "quote" => "USD", - "min_ask_amount" => 0.001, - "min_bid_amount" => 0.001, + "id" => "BTCUSD", } } end @@ -67,11 +65,7 @@ { "account_id" => 2, "market" => { - "id" => "BTCUSD", - "base" => "BTC", - "quote" => "USD", - "min_ask_amount" => 0.1, - "min_bid_amount" => 0.1, + "id" => "BTCUSD", }, } end @@ -80,8 +74,6 @@ let(:target_bids) { target_orderbook.first[:buy] } let(:target_asks) { target_orderbook.first[:sell] } - include_context "mocked binance" - before(:each) do target.account.fetch_balances source.start @@ -206,9 +198,7 @@ { "account_id" => 1, "market" => { - "id" => "BTCUSDT", - "base" => "BTC", - "quote" => "USDT", + "id" => "BTCUSDT", } } end diff --git a/spec/lib/arke/strategy/fixedprice_spec.rb b/spec/lib/arke/strategy/fixedprice_spec.rb index 55c9b6e1..25171f89 100644 --- a/spec/lib/arke/strategy/fixedprice_spec.rb +++ b/spec/lib/arke/strategy/fixedprice_spec.rb @@ -32,11 +32,7 @@ "target" => { "driver" => "bitfaker", "market" => { - "id" => "BTCUSD", - "base" => "BTC", - "quote" => "USD", - "min_ask_amount" => 0.001, - "min_bid_amount" => 0.001, + "id" => "BTCUSD", }, } } @@ -63,18 +59,18 @@ let(:side) { "both" } it "outputs a target orberbook" do expect(target_bids.to_hash).to eq( - 120.4910.to_d => 0.0010.to_d, - 120.5008.to_d => 0.1204.to_d, - 120.5106.to_d => 0.2398.to_d, - 120.5204.to_d => 0.3592.to_d, - 120.5302.to_d => 0.4786.to_d + 120.4910.to_d => 0.10.to_d, + 120.5008.to_d => 0.16.to_d, + 120.5106.to_d => 0.22.to_d, + 120.5204.to_d => 0.28.to_d, + 120.5302.to_d => 0.34.to_d ) expect(target_asks.to_hash).to eq( - 124.2401.to_d => 0.3186.to_d, - 124.2502.to_d => 0.2392.to_d, - 124.2603.to_d => 0.1598.to_d, - 124.2704.to_d => 0.0804.to_d, - 124.2805.to_d => 0.0010.to_d + 124.2401.to_d => 0.18.to_d, + 124.2502.to_d => 0.16.to_d, + 124.2603.to_d => 0.14.to_d, + 124.2704.to_d => 0.12.to_d, + 124.2805.to_d => 0.10.to_d ) end end @@ -84,11 +80,11 @@ it "outputs a target orberbook" do expect(target_bids.to_hash).to eq({}) expect(target_asks.to_hash).to eq( - 124.2401.to_d => 0.3186.to_d, - 124.2502.to_d => 0.2392.to_d, - 124.2603.to_d => 0.1598.to_d, - 124.2704.to_d => 0.0804.to_d, - 124.2805.to_d => 0.0010.to_d + 124.2401.to_d => 0.18.to_d, + 124.2502.to_d => 0.16.to_d, + 124.2603.to_d => 0.14.to_d, + 124.2704.to_d => 0.12.to_d, + 124.2805.to_d => 0.10.to_d ) end end @@ -97,11 +93,11 @@ let(:side) { "bids" } it "outputs a target orberbook" do expect(target_bids.to_hash).to eq( - 120.4910.to_d => 0.0010.to_d, - 120.5008.to_d => 0.1204.to_d, - 120.5106.to_d => 0.2398.to_d, - 120.5204.to_d => 0.3592.to_d, - 120.5302.to_d => 0.4786.to_d + 120.4910.to_d => 0.10.to_d, + 120.5008.to_d => 0.16.to_d, + 120.5106.to_d => 0.22.to_d, + 120.5204.to_d => 0.28.to_d, + 120.5302.to_d => 0.34.to_d ) expect(target_asks.to_hash).to eq({}) end @@ -114,18 +110,19 @@ it "outputs a target orberbook" do expect(target_bids.to_hash).to eq( - 122.95.to_d => 0.0010.to_d, - 122.96.to_d => 0.1204.to_d, - 122.97.to_d => 0.2398.to_d, - 122.98.to_d => 0.3592.to_d, - 122.99.to_d => 0.4786.to_d + 122.95.to_d => 0.10e0.to_d, + 122.96.to_d => 0.16e0.to_d, + 122.97.to_d => 0.22e0.to_d, + 122.98.to_d => 0.28e0.to_d, + 122.99.to_d => 0.34e0.to_d, ) + expect(target_asks.to_hash).to eq( - 123.01.to_d => 0.3186.to_d, - 123.02.to_d => 0.2392.to_d, - 123.03.to_d => 0.1598.to_d, - 123.04.to_d => 0.0804.to_d, - 123.05.to_d => 0.0010.to_d + 123.01.to_d => 0.18.to_d, + 123.02.to_d => 0.16.to_d, + 123.03.to_d => 0.14.to_d, + 123.04.to_d => 0.12.to_d, + 123.05.to_d => 0.10.to_d ) end end diff --git a/spec/lib/arke/strategy/microtrades_spec.rb b/spec/lib/arke/strategy/microtrades_spec.rb index cc1cac50..78774857 100644 --- a/spec/lib/arke/strategy/microtrades_spec.rb +++ b/spec/lib/arke/strategy/microtrades_spec.rb @@ -40,13 +40,7 @@ "target" => { "driver" => "bitfaker", "market" => { - "id" => "BTCUSD", - "base" => "BTC", - "quote" => "USD", - "base_precision" => 4, - "quote_precision" => 4, - "min_ask_amount" => 0.001, - "min_bid_amount" => 0.001, + "id" => "BTCUSD", }, } } @@ -101,8 +95,8 @@ expect(linked_strategy.target.open_orders.total_side_amount(:buy)).to eq(285.56554348.to_d) expect(linked_strategy.target.open_orders.total_side_amount(:sell)).to eq(700.37113197.to_d) - expect(strategy.get_amount(:buy)).to eq 420.2226 - expect(strategy.get_amount(:sell)).to eq 171.3393 + expect(strategy.get_amount(:buy)).to eq 420.222679 + expect(strategy.get_amount(:sell)).to eq 171.339326 end it "does not limit the amount of sell and buy orders when it doesn't exceed 60% of linked strategy open orders total supply" do diff --git a/spec/support/contexts/binance_context.rb b/spec/support/contexts/binance_context.rb index 9a808c11..37758e39 100644 --- a/spec/support/contexts/binance_context.rb +++ b/spec/support/contexts/binance_context.rb @@ -46,23 +46,58 @@ {"rateLimitType": "ORDERS", "interval": "DAY", "intervalNum": 1, "limit": 100_000}], "exchangeFilters": [], "symbols": - [{:symbol => "ETHUSDT", - :status => "TRADING", - :baseAsset => "ETH", - "baseAssetPrecision" => 8, - :quoteAsset => "USDT", - :quotePrecision => 8, - :orderTypes => %w[LIMIT LIMIT_MAKER MARKET STOP_LOSS_LIMIT TAKE_PROFIT_LIMIT], - :icebergAllowed => true, - :isSpotTradingAllowed => true, - :isMarginTradingAllowed => true, - :filters => [{"filterType": "PRICE_FILTER", "minPrice": "0.01000000", "maxPrice": "10000000.00000000", "tickSize": "0.01000000"}, - {"filterType": "PERCENT_PRICE", "multiplierUp": "5", "multiplierDown": "0.2", "avgPriceMins": 5}, - {"filterType": "LOT_SIZE", "minQty": "0.00001000", "maxQty": "10000000.00000000", "stepSize": "0.00001000"}, - {"filterType": "MIN_NOTIONAL", "minNotional": "10.00000000", "applyToMarket": true, "avgPriceMins": 5}, - {"filterType": "ICEBERG_PARTS", "limit": 10}, - {"filterType": "MARKET_LOT_SIZE", "minQty": "0.00000000", "maxQty": "52400.00000000", "stepSize": "0.00000000"}, - {"filterType": "MAX_NUM_ALGO_ORDERS", "maxNumAlgoOrders": 5}]}] + [ + {:symbol => "ETHUSDT", + :status => "TRADING", + :baseAsset => "ETH", + "baseAssetPrecision" => 8, + :quoteAsset => "USDT", + :quotePrecision => 8, + :orderTypes => %w[LIMIT LIMIT_MAKER MARKET STOP_LOSS_LIMIT TAKE_PROFIT_LIMIT], + :icebergAllowed => true, + :isSpotTradingAllowed => true, + :isMarginTradingAllowed => true, + :filters => [ + {"filterType": "PRICE_FILTER", "minPrice": "0.01000000", "maxPrice": "10000000.00000000", "tickSize": "0.01000000"}, + {"filterType": "PERCENT_PRICE", "multiplierUp": "5", "multiplierDown": "0.2", "avgPriceMins": 5}, + {"filterType": "LOT_SIZE", "minQty": "0.00001000", "maxQty": "10000000.00000000", "stepSize": "0.00001000"}, + {"filterType": "MIN_NOTIONAL", "minNotional": "10.00000000", "applyToMarket": true, "avgPriceMins": 5}, + {"filterType": "ICEBERG_PARTS", "limit": 10}, + {"filterType": "MARKET_LOT_SIZE", "minQty": "0.00000000", "maxQty": "52400.00000000", "stepSize": "0.00000000"}, + {"filterType": "MAX_NUM_ALGO_ORDERS", "maxNumAlgoOrders": 5} + ]}, + { + "symbol": "BTCUSDT", + "status": "TRADING", + "baseAsset": "BTC", + "baseAssetPrecision": 8, + "quoteAsset": "USDT", + "quotePrecision": 8, + "baseCommissionPrecision": 8, + "quoteCommissionPrecision": 8, + "orderTypes": %w[ + LIMIT + LIMIT_MAKER + MARKET + STOP_LOSS_LIMIT + TAKE_PROFIT_LIMIT + ], + "icebergAllowed": true, + "ocoAllowed": true, + "quoteOrderQtyMarketAllowed": true, + "isSpotTradingAllowed": true, + "isMarginTradingAllowed": true, + "filters": [ + {"filterType": "PRICE_FILTER", "minPrice": "0.01000000", "maxPrice": "1000000.00000000", "tickSize": "0.01000000"}, + {"filterType": "PERCENT_PRICE", "multiplierUp": "5", "multiplierDown": "0.2", "avgPriceMins": 5}, + {"filterType": "LOT_SIZE", "minQty": "0.00000100", "maxQty": "9000.00000000", "stepSize": "0.00000100"}, + {"filterType": "MIN_NOTIONAL", "minNotional": "10.00000000", "applyToMarket": true, "avgPriceMins": 5}, + {"filterType": "ICEBERG_PARTS", "limit": 10}, + {"filterType": "MARKET_LOT_SIZE", "minQty": "0.00000000", "maxQty": "3200.00000000", "stepSize": "0.00000000"}, + {"filterType": "MAX_NUM_ALGO_ORDERS", "maxNumAlgoOrders": 5} + ] + } + ] }.to_json, headers: { "content-type" => "application/json;charset=utf-8", diff --git a/spec/support/contexts/bitfinex_context.rb b/spec/support/contexts/bitfinex_context.rb index 9f9e90ac..88ce7da7 100644 --- a/spec/support/contexts/bitfinex_context.rb +++ b/spec/support/contexts/bitfinex_context.rb @@ -104,5 +104,40 @@ "available": "100" } ].to_json, headers: {"content-type" => "application/json;charset=utf-8"}) + + stub_request(:get, "https://api.bitfinex.com/v1/symbols_details") + .to_return(status: 200, + body: [ + { + "pair": "btcusd", + "price_precision": 5, + "initial_margin": "30.0", + "minimum_margin": "15.0", + "maximum_order_size": "2000.0", + "minimum_order_size": "0.0006", + "expiration": "NA", + "margin": true + }, + { + "pair": "ltcusd", + "price_precision": 5, + "initial_margin": "30.0", + "minimum_margin": "15.0", + "maximum_order_size": "5000.0", + "minimum_order_size": "0.2", + "expiration": "NA", + "margin": true + }, + { + "pair": "ethusd", + "price_precision": 5, + "initial_margin": "30.0", + "minimum_margin": "15.0", + "maximum_order_size": "5000.0", + "minimum_order_size": "0.04", + "expiration": "NA", + "margin": true + }, + ].to_json, headers: {"content-type" => "application/json;charset=utf-8"}) end end diff --git a/spec/support/contexts/huobi_context.rb b/spec/support/contexts/huobi_context.rb index 859c0399..f6cfd43e 100644 --- a/spec/support/contexts/huobi_context.rb +++ b/spec/support/contexts/huobi_context.rb @@ -24,6 +24,88 @@ headers: {} ) + stub_request(:get, "https://api.huobi.pro/v1/common/symbols") + .to_return( + status: 200, + body: { + "status": "ok", + "data": [ + { + "base-currency": "btc", + "quote-currency": "usdt", + "price-precision": 2, + "amount-precision": 6, + "symbol-partition": "main", + "symbol": "btcusdt", + "state": "online", + "value-precision": 8, + "min-order-amt": 0.0001, + "max-order-amt": 1000, + "min-order-value": 1, + "leverage-ratio": 5, + "super-margin-leverage-ratio": 3 + }, + { + "base-currency": "eth", + "quote-currency": "usdt", + "price-precision": 2, + "amount-precision": 4, + "symbol-partition": "main", + "symbol": "ethusdt", + "state": "online", + "value-precision": 8, + "min-order-amt": 0.001, + "max-order-amt": 10_000, + "min-order-value": 1, + "leverage-ratio": 5, + "super-margin-leverage-ratio": 3 + }, + { + "base-currency": "mtx", + "quote-currency": "eth", + "price-precision": 8, + "amount-precision": 2, + "symbol-partition": "innovation", + "symbol": "mtxeth", + "state": "online", + "value-precision": 8, + "min-order-amt": 0.1, + "max-order-amt": 1_000_000, + "min-order-value": 0.001 + }, + { + "base-currency": "zla", + "quote-currency": "btc", + "price-precision": 8, + "amount-precision": 2, + "symbol-partition": "innovation", + "symbol": "zlabtc", + "state": "online", + "value-precision": 8, + "min-order-amt": 0.1, + "max-order-amt": 1_000_000, + "min-order-value": 0.0001 + }, + { + "base-currency": "wtc", + "quote-currency": "usdt", + "price-precision": 4, + "amount-precision": 4, + "symbol-partition": "innovation", + "symbol": "wtcusdt", + "state": "online", + "value-precision": 8, + "min-order-amt": 0.1, + "max-order-amt": 300_000, + "min-order-value": 1 + }, + ] + }.to_json, + headers: { + "content-type" => "application/json;charset=utf-8" + } + ) + stub_request(:get, build_url("/v1/account/accounts", "GET")) .to_return(status: 200, body: { "data": [ @@ -124,7 +206,7 @@ def build_url(path, method) AccessKeyId: api_key, SignatureMethod: "HmacSHA256", SignatureVersion: 2, - Timestamp: Time.now.getutc.strftime("%Y-%m-%dT%H:%M:%S") + Timestamp: Time.now.getutc.strftime("%Y-%m-%dT%H") } data = "#{method}\napi.huobi.pro\n#{path}\n#{Rack::Utils.build_query(hash_sort(h))}" h["Signature"] = Base64.encode64(OpenSSL::HMAC.digest("sha256", secret, data)).gsub("\n", "") diff --git a/spec/support/contexts/kraken_context.rb b/spec/support/contexts/kraken_context.rb new file mode 100644 index 00000000..e8bedefb --- /dev/null +++ b/spec/support/contexts/kraken_context.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +shared_context "mocked kraken" do + before(:each) do + stub_request(:get, "https://api.kraken.com/0/public/AssetPairs") + .to_return( + status: 200, + body: file_fixture("kraken-assets.json").read, + headers: { + "content-type" => "application/json; charset=utf-8" + } + ) + end +end diff --git a/spec/support/contexts/rubykube_context.rb b/spec/support/contexts/rubykube_context.rb index fb5b7d35..f40dd62c 100644 --- a/spec/support/contexts/rubykube_context.rb +++ b/spec/support/contexts/rubykube_context.rb @@ -56,5 +56,49 @@ ].to_json, headers: {} ) + + stub_request(:get, %r{peatio/public/markets}) + .to_return( + status: 200, + body: [ + { + "id" => "ethbtc", + "name" => "ETH/BTC", + "base_unit" => "eth", + "quote_unit" => "btc", + "min_price" => "0.001", + "max_price" => "0.3", + "min_amount" => "0.025", + "amount_precision" => 4, + "price_precision" => 6, + "state" => "enabled" + }, + { + "id" => "btcusd", + "name" => "BTC/USD", + "base_unit" => "btc", + "quote_unit" => "usd", + "min_price" => "100.0", + "max_price" => "100000.0", + "min_amount" => "0.0005", + "amount_precision" => 6, + "price_precision" => 2, + "state" => "enabled" + }, + { + "id" => "ethusd", + "name" => "ETH/USD", + "base_unit" => "eth", + "quote_unit" => "usd", + "min_price" => "100.0", + "max_price" => "100000.0", + "min_amount" => "0.0005", + "amount_precision" => 4, + "price_precision" => 2, + "state" => "enabled" + } + ].to_json, + headers: {} + ) end end