mbp:ccxt igorkroitor$ python examples/py/symbols.py liqui Instantiating liqui exchange liqui has 172 symbols: [u'1ST/BTC', u'1ST/ETH', u'1ST/USDT', u'ADX/BTC', u'ADX/ETH', u'ADX/USDT', u'AE/BTC', u'AE/ETH', u'AE/USDT', u'ANS/BTC', u'ANT/BTC', u'ANT/ETH', u'ANT/USDT', u'BAT/BTC', u'BAT/ETH', u'BAT/USDT', u'BCAP/BTC', u'BCAP/ETH', u'BCAP/USDT', u'BCH/BTC', u'BCH/ETH', u'BCH/USDT', u'BNT/BTC', u'BNT/ETH', u'BNT/USDT', u'BTC/USDT', u'CFI/BTC', u'CFI/ETH', u'CFI/USDT', u'CVC/BTC', u'CVC/ETH', u'CVC/USDT', u'DASH/BTC', u'DASH/ETH', u'DASH/USDT', u'DCT/BTC', u'DGD/BTC', u'DGD/ETH', u'DGD/USDT', u'DNT/BTC', u'DNT/ETH', u'DNT/USDT', u'EDG/BTC', u'EDG/ETH', u'EDG/USDT', u'EOS/BTC', u'EOS/ETH', u'EOS/USDT', u'ETH/BTC', u'ETH/USDT', u'GBG/BTC', u'GNO/BTC', u'GNO/ETH', u'GNO/USDT', u'GNT/BTC', u'GNT/ETH', u'GNT/USDT', u'GOLOS/BTC', u'GUP/BTC', u'GUP/ETH', u'GUP/USDT', u'HMQ/BTC', u'HMQ/ETH', u'HMQ/USDT', u'ICN/BTC', u'ICN/ETH', u'ICN/USDT', u'INCNT/BTC', u'INCNT/ETH', u'INCNT/USDT', u'LTC/BTC', u'LTC/ETH', u'LTC/USDT', u'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
@asyncio.coroutine | |
def factorial(name, number): | |
f = 1 | |
for i in range(2, number + 1): | |
print("Task %s: Compute factorial(%d)..." % (name, i)) | |
yield from asyncio.sleep(1) | |
f *= i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import hashlib | |
import hmac | |
import time | |
import requests | |
import datetime | |
# Q. Do you have A Websocket API? | |
# A. Yes, and we strongly recommend you to use it. Please, check our JavaScript websocket implementation for our WebSocket API here: | |
# https://github.com/blinktrade/frontend/blob/master/jsdev/bitex/api/bitex.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
import time | |
import datetime | |
import argparse | |
import unicodecsv as csv | |
def get_trades(currency, since, trade_list=[]): | |
headers = { |
I hereby claim:
- I am kroitor on github.
- I am x84 (https://keybase.io/x84) on keybase.
- I have a public key ASBQGnpOZ5JT-FFFKsIG7RNrf8ljzTTjpOFyqyvo9x2cEAo
To claim this, I am signing this object:
mbp:ccxt igorkroitor$ node examples/js/cli bitfinex fetchTicker ETH/BTC --poll
bitfinex.fetchTicker (ETH/BTC)
{ symbol: "ETH/BTC",
timestamp: 1527681940914.8806,
datetime: "2018-05-30T12:05:40.914Z",
high: 0.07748,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ccxt | |
exchange = ccxt.bitmex({ | |
'apiKey': 'YOUR_API_KEY', | |
'secret': 'YOUR_API_SECRET', | |
'enableRateLimit': True, # ←------ required by the Manual!!! | |
'twofa': 'YOUR_OTP_SECRET', # looks like '3S23Q7EM7Z6TX5R2' | |
}) | |
exchange.load_markets() # preload the markets manually |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function random () { return Math.random () } | |
async function randomAsync () { return Math.random () } | |
async function testAwaitAsync (n) { | |
const start = process.hrtime () | |
for (let i = 0; i < n; i++) { await randomAsync () } | |
console.log ('await async:', process.hrtime (start)) | |
} |
mbp:ccxt igorkroitor$ node examples/js/cli indodax fetchTrades USDT/IDR --verbose
indodax.fetchTrades (USDT/IDR)
fetch:
indodax GET https://indodax.com/api/usdt_idr/trades
Request:
{}
undefined
handleRestResponse:
mbp:ccxt igorkroitor$ python3 examples/py/cli.py indodax fetchTrades USDT/IDR --verbose
Request: GET https://indodax.com/api/usdt_idr/trades {'User-Agent': 'python-requests/2.21.0', 'Accept-Encoding': 'gzip, deflate'} None
Response: GET https://indodax.com/api/usdt_idr/trades 200 {'Date': 'Wed, 12 Feb 2020 22:42:11 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Set-Cookie': '__cfduid=d522eeaf4ac56b2a65f6628efae762f181581547330; expires=Fri, 13-Mar-20 22:42:10 GMT; path=/; domain=.indodax.com; HttpOnly; SameSite=Lax; Secure', 'X-Powered-By': 'INDODAX', 'v': '2', 'Access-Control-Allow-Origin': '', 'X-Served-By': 'PA-SG', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'CF-Cache-Status': 'DYNAMIC', 'Expect-CT': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains; preload', 'Server': 'cloudf
OlderNewer