Closed serteikas closed 3 years ago
You can do that with CCXT using params
overrides as described in the Manual:
import ccxt
from pprint import pprint
print('CCXT Version:', ccxt.__version__)
exchange = ccxt.kraken({
'apiKey': 'YOUR_API_KEY',
'secret': 'YOUR_SECRET',
'enableRateLimit': True,
})
markets = exchange.load_markets()
# exchange.verbose = True # uncomment for debugging purposes
symbol = 'BTC/USD'
type = 'market'
side = 'buy' # or 'sell'
amount = YOUR_AMOUNT_HERE
price = None
params = {'ordertype':'settle-position'}
order = exchange.create_order(symbol, type, side, amount, price, params)
pprint(order)
In general, I'd highly recommend reading the entire Manual from top to bottom, that will save your time:
Let us know if the above does not answer your question.
How to replicate Kraken "settle-position" order type in CCXT?
I've tried using additional parameters (ex: "type': 'settle-position') but it did not work. Is this order type supported if so what would be the correct syntax for it?
Thanks.