A Trading Gateway
Project description
Trade Gate
An algorithmic trading library to use as a gateway to different exchanges.
Documentations and examples
Documentations are available on read the docs, but currently it's not complete. Examples for each exchange will be added soon, until then, there are good examples in the Test folder.
How to install
Use this Github repository by running python setup.py install
, or using pip:
pip install TradeGate
How to use
Use with a config file in JSON format. Your config file should look like this:
{
"Binance": {
"exchangeName": "Binance",
"credentials": {
"main": {
"futures": {
"key": "API-KEY",
"secret": "API-SECRET"
},
"spot": {
"key": "API-KEY",
"secret": "API-SECRET"
}
},
"test": {
"futures": {
"key": "API-KEY",
"secret": "API-SECRET"
},
"spot": {
"key": "API-KEY",
"secret": "API-SECRET"
}
}
}
}
}
You should read this config file as JSON and give the desired exchange information to the main class initializer. Use sandbox argument to connect to the testnets of exchanges (if it exists). This is shown below:
from TradeGate import TradeGate
import json
with open('/path/to/config/file.json') as f:
config = json.load(f)
gate = TradeGate(config['Binance'], sandbox=True)
print(gate.getSymbolTickerPrice('BTCUSDT'))
Current Supported Exchanges
- Binance
- ByBit
- KuCoin
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. The best way to contribute right now is to implement as many exchanges as possible. Make sure all test cases are passing.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for TradeGate-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9007e27e606be236dcb9579c541b71cea6ab096765fa0175b2411625daa9462a |
|
MD5 | e7374f88281fd45d3383781cc263df18 |
|
BLAKE2b-256 | 47344ee68fe9358d3a2bc44a20753a2bc76db80eddec5bf2c9e4a4143e233985 |