All
Filtrer etter:
Hvordan setter jeg inn penger på kontoen min?
Jeg trenger hjelp med kontobekreftelse
Hvorfor kan jeg ikke få tilgang til kontoen min?
Finnes det noen gebyrer for uttak av krypto?
Jeg trenger hjelp med å logge på kontoen min
The REST AddOrder and WebSocket addOrder endpoints are used to place orders on our markets, but due to the variety of possible orders (different order types, varying prices, varying sizes, custom order options, etc.), there are many different ways to call the AddOrder/addOrder endpoints.
As some helpful suggestions for configuring your own orders, the following are examples of AddOrder/addOrder calls with some of the most frequently used parameters. The examples use our REST API command line client, but the same parameters could be used via any API interface (curl, Postman, custom API code, etc.).
$ ./krakenapi AddOrder pair=xdgusd type=buy ordertype=market volume=50
{"error":[],"result":{"descr":{"order":"buy 50.00000000 XDGUSD @ market"},"txid":["OFKBX4-NUHFI-JIKLLM"]}}
$ ./krakenapi AddOrder pair=xdgusd type=sell ordertype=limit price=1.00 volume=50
{"error":[],"result":{"descr":{"order":"sell 50.00000000 XDGUSD @ limit 1.0000000"},"txid":["O562OP-O6FNI-SEQ23Y"]}}
$ ./krakenapi AddOrder pair=xdgusd type=sell ordertype=limit price=1.00 volume=50 oflags=post
{"error":[],"result":{"descr":{"order":"sell 50.00000000 XDGUSD @ limit 1.0000000"},"txid":["OWFYJG-DJUOO-F5BISK"]}}
$ ./krakenapi AddOrder pair=xdgusd type=buy ordertype=market volume=50 'close[ordertype]=stop-loss' 'close[price]=-5%'
{"error":[],"result":{"descr":{"order":"buy 50.00000000 XDGUSD @ market","close":"close position @ stop loss -5.0000%"},"txid":["OW7UJZ-P7F7Z-JAHANL"]}}
$ ./krakenapi AddOrder pair=xdgusd type=buy ordertype=market volume=50 'close[ordertype]=take-profit-limit' 'close[price]=1.00' 'close[price2]=1.00'
{"error":[],"result":{"descr":{"order":"buy 50.00000000 XDGUSD @ market","close":"close position @ take profit 1.0000000 -> limit 1.0000000"},"txid":["OJ7K64-4PQ5Y-DE7FRG"]}}
$ ./krakenapi AddOrder pair=xdgusd type=buy ordertype=limit price=1.00 volume=50 timeinforce=ioc {"error":[],"result":{"txid":["OZS2KT-JVN2E-J2XM7Z"],"descr":{"order":"buy 50.00000000 XDGUSD @ limit 1.0000000"}}}
$ ./krakenapi AddOrder pair=xdgusd type=sell ordertype=limit price=1.00 volume=50 displayvol=25 {"error":[],"result":{"txid":["ODMXEB-NUCVA-QWG6HH"],"descr":{"order":"sell 50.00000000 XDGUSD @ limit 1.0000000"}}}
$ ./krakenapi AddOrder pair=xbtusd type=buy ordertype=market volume=0.0005 leverage=5
{"error":[],"result":{"descr":{"order":"buy 0.00050000 XBTUSD @ market with 5:1 leverage"},"txid":["OXCTLW-XCYRT-MSP4FS"]}}
$ ./krakenapi AddOrder pair=xbtusd type=buy ordertype=settle-position volume=0 leverage=5
{"error":[],"result":{"descr":{"order":"buy 0.00000000 XBTUSD @ settle position"},"txid":["OYO2FZ-7SYNG-GDBZ6M"]}}
Note the volume of 0 (zero), which can be used to close/settle margin positions without knowing the exact volume.
Full details of all of the possible AddOrder endpoint input parameters are available via our REST API and WebSocket API documentation.