mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 01:08:07 +00:00
commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
- [Binance Test Order](./examples/py/)
|
||||
|
||||
|
||||
```python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
import ccxt # noqa: E402
|
||||
|
||||
|
||||
exchange = ccxt.binance({
|
||||
'apiKey': 'YOUR_API_KEY',
|
||||
'secret': 'YOUR_SECRET',
|
||||
})
|
||||
|
||||
symbol = 'ETH/BTC'
|
||||
type = 'limit' # or 'market'
|
||||
side = 'sell' # or 'buy'
|
||||
amount = 1.0
|
||||
price = 0.060154 # or None
|
||||
|
||||
# extra params and overrides if needed
|
||||
params = {
|
||||
'test': True, # test if it's valid, but don't actually place it
|
||||
}
|
||||
|
||||
order = exchange.create_order(symbol, type, side, amount, price, params)
|
||||
|
||||
print(order)
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user