Skip to content

Instantly share code, notes, and snippets.

@mnaichuk
Last active April 20, 2020 15:19
Show Gist options
  • Save mnaichuk/fd0c82a042c54b0a363dc072f478fde4 to your computer and use it in GitHub Desktop.
Save mnaichuk/fd0c82a042c54b0a363dc072f478fde4 to your computer and use it in GitHub Desktop.
# Bitfinex
markets = {'btcusdt':'btcust', 'ethbtc':'ethbtc', 'ethusdt':'ethust', 'ltcusdt':'ltcust', 'bchusdt':'babust', 'eosusdt':'eosust', 'bchbtc':'babbtc', 'ltcbtc':'ltcbtc', 'btgbtc':'btgbtc', 'xrpbtc':'xrpbtc', 'eosbtc':'eosbtc', 'dashbtc':'dshbtc' }
markets.each do |k,v|
Market.find(k).update!(data: {upstream: {"driver": "bitfinex", "target": v, "rest": "http://api-pub.bitfinex.com/ws/2", "websocket": "wss://api-pub.bitfinex.com/ws/2", "trade_proxy"=>true, "orderbook_proxy"=>true}})
end
# Huobi
markets = {'btckrw':'btckrw', "bchkrw": "bchkrw", "btgkrw": "btgkrw", "ethkrw": "ethkrw", "ltckrw":"ltckrw", "xrpkrw":"xrpkrw", "eoskrw":"eoskrw" }
markets.each do |k,v|
Market.find(k).update!(data: {upstream: {"driver": "huobi", "target": v, "rest": "https://api-cloud.huobi.co.kr/", "websocket": "wss://api-cloud.huobi.co.kr//ws"}})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment