- Create or open desired Google Sheets
- Open Tools >> Script Edit
- Create
jsSHA.gsandCryptoGAS.gsfiles with content from this repo
Currently, CryptoGAS has API integration with below trading platforms:
- Bittrex
- HitBTC
- Binance (In Development)
Open a sheet then type following function with all required parameters
=Bittrex(apiMethod,apiKey,apiSecret, query, parseOptions)
| Parameter | Required | Description |
|---|---|---|
| apiMethod | 🔴 | See below for all supported methods |
| apiKey | 🔴 | API Key obtained in the Settings |
| apiSecret | 🔴 | Secret passphrase to sign request |
| query | ⚪ | A comma-separated list of fields to import, decided by the path of the header. Use rawHeaders option below to get the path info |
| parseOptions | ⚪ | A comma-separated list of these options: noInherit, noTruncate, rawHeaders, noHeaders, noParseNumbers, debugLocation |
Example: =Bittrex('account/getbalances','myApiKey','mySecretKey')
| Method | Status | Description |
|---|---|---|
| public/getmarkets | ✔️ | Used to get the open and available trading markets at Bittrex along with other meta data. |
| public/getcurrencies | ✔️ | Used to get all supported currencies at Bittrex along with other meta data. |
| public/getticker | ❌ | Used to get the current tick values for a market. |
| public/getmarketsummaries | ✔️ | Used to get the last 24 hour summary of all active exchanges |
| public/getmarketsummary | ❌ | Used to get the last 24 hour summary of all active exchanges for a given market |
| public/getorderbook | ❌ | Used to get retrieve the orderbook for a given market |
| public/getmarkethistory | ❌ | Used to retrieve the latest trades that have occured for a specific market. |
| market/getopenorders | ❌ | Get all orders that you currently have opened. A specific market can be requested (in development) |
| account/getbalances | ✔️ | Used to retrieve all balances from your account |
| account/getbalance | ❌ | Used to retrieve the balance from your account for a specific currency. |
| account/getdepositaddress | ❌ | Used to retrieve or generate an address for a specific currency. If one does not exist, the call will fail and return ADDRESS_GENERATING until one is available. |
| account/getorder | ❌ | Used to retrieve a single order by uuid. |
| account/getorderhistory | ✔️ | Used to retrieve your order history. |
| account/getwithdrawalhistory | ✔️ | Used to retrieve your withdrawal history. |
| account/getdeposithistory | ✔️ | Used to retrieve your deposit history. |
Methods with ❌ required additional parameters which are not supported yet. API Reference: https://bittrex.com/Home/Api
| Option | Description |
|---|---|
| noInherit | Don't inherit values from parent elements |
| noTruncate | Don't truncate values |
| rawHeaders | Don't prettify headers |
| noHeaders | Don't include headers, only the data |
| noParseNumbers | Don't parse number from string, leave it as it is |
| debugLocation | Prepend each value with the row & column it belongs in |
Open a sheet then type following function with all required parameters
=HitBTC(apiMethod,apiKey,apiSecret, query, parseOptions)
| Parameter | Required | Description |
|---|---|---|
| apiMethod | 🔴 | See below for all supported methods |
| apiKey | 🔴 | API Key obtained in the Settings |
| apiSecret | 🔴 | Secret passphrase to sign request |
| query | ⚪ | A comma-separated list of fields to import, decided by the path of the header. Use rawHeaders option below to get the path info |
| parseOptions | ⚪ | A comma-separated list of these options: noInherit, noTruncate, rawHeaders, noHeaders, noParseNumbers, debugLocation |
Example: =HitBTC('account/balance','myApiKey','mySecretKey')
| Method | Status | Description |
|---|---|---|
| public/currency | ✔️ | Return the actual list of available currencies, tokens, ICO etc. |
| public/currency/{currency} | ✔️ | Return the information of a specific currency. |
| public/symbol | ✔️ | Return the actual list of currency symbols (currency pairs) traded on HitBTC exchange. |
| public/symbol/{symbol} | ✔️ | Return information of a specific symbol |
| public/ticker | ✔️ | Return ticker information |
| public/ticker/{symbol} | ✔️ | Return ticker information of a specific symbol |
| public/orderbook/{symbol} | ❗ | Return an order book which is an electronic list of buy and sell orders for a specific symbol, organized by price level. |
| public/candles/{symbol} | ❗ | Return a candles used for OHLC a specific symbol. |
| trading/balance | ✔️ | Get trading balance all all currencies |
| order | ✔️ | Return array of active orders. |
| order/{clientOrderId} | ✔️ | Return information of a specific order |
| trading/fee/{symbol} | ✔️ | Get personal trading commission rate. |
| history/order | ❗ | Return all order history. All orders older then 24 hours without trades are deleted. |
| history/trades | ❗ | Return all trades history. |
| history/order/{orderId}/trades | ✔️ | Return all trades history for an order |
| account/balance | ✔️ | Get all account balances |
| account/transactions | ❗ | Get all transactions history |
| account/transactions/{id} | ❗ | Get transaction by transaction ID |
Methods with ❗ only support default parameters. They will be functional when the script support additional parameters in the function. Check API Reference for default values: https://api.hitbtc.com
In development
- Support API Method parameters
- Coinbase API
- GDAX API
- Bitfinex API
- BTC: 16hDsVgy6VFW2aW8w9z2pogbq5XThToswF
- ETH: 0x212799fbd9CD3e273E0CB6761b1708B284477e5E
- LTC: LQtecz6SAbRzJXEfDpNLz8AzkhWKY4qQyv
- BCH: 13mT5ubjZUKTviGXDSVHxRkrrxDFzzUFd4
Thanks to below projects, developing CryptoGAS can be done as fast as possible.
Apache 2.0 License