File tree 1 file changed +20
-7
lines changed
1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ $ curl localhost:8080/v2/orders -X POST \
251
251
Returns solana tx signature on success
252
252
253
253
### Modify Orders
254
- like place orders but caller must specify either ` orderId ` or ` userOrderId ` to indicate which order(s) to modify.
254
+ like place orders but caller must use either ` orderId ` or ` userOrderId ` to indicate which order(s) to modify.
255
255
256
256
- ` amount ` can be modified to flip the order from long/short to bid/ask
257
257
- the order market cannot be modified.
@@ -260,14 +260,18 @@ $ curl localhost:8080/v2/orders -X PATCH \
260
260
-H ' content-type: application/json' \
261
261
-d ' {
262
262
"orders": [{
263
+ "marketIndex": 0,
264
+ "marketType": "perp",
263
265
"amount": -1.1,
264
266
"price": 80.5,
265
267
"userOrderId": 101
266
268
},
267
269
{
268
- "amount": 1.05,
270
+ "marketIndex": 1,
271
+ "marketType": "spot",
272
+ "amount": 2.05,
269
273
"price": 61.0,
270
- "orderId ": 32
274
+ "userOrderId ": 32
271
275
}]
272
276
}'
273
277
```
@@ -286,10 +290,10 @@ $ curl localhost:8080/v2/orders -X DELETE
286
290
```
287
291
Returns solana tx signature on success
288
292
289
- ### Cancel and Place Orders
293
+ ### Atomic Cancel/Modify/ Place Orders
290
294
291
- Atomically cancel then place orders without possible downtime.
292
- Request format is an embedded cancel and place request
295
+ Atomically cancel, modify, and place orders without possible downtime.
296
+ Request format is an embedded cancel modify, and place request
293
297
294
298
``` bash
295
299
$ curl localhost:8080/v2/orders/cancelAndPlace -X POST -H ' content-type: application/json' \
@@ -298,13 +302,22 @@ $ curl localhost:8080/v2/orders/cancelAndPlace -X POST -H 'content-type: applica
298
302
"marketIndex": 0,
299
303
"marketType": "perp"
300
304
},
305
+ "modify": {
306
+ "orders": [{
307
+ "marketIndex": 0,
308
+ "marketType": "perp",
309
+ "orderId": 555,
310
+ "amount": -0.5,
311
+ "price": 82.0
312
+ }]
313
+ },
301
314
"place": {
302
315
"orders": [
303
316
{
304
317
"marketIndex": 0,
305
318
"marketType": "perp",
306
319
"amount": -1.23,
307
- "price": 80 .0,
320
+ "price": 99 .0,
308
321
"postOnly": true,
309
322
"orderType": "limit",
310
323
"immediateOrCancel": false,
You can’t perform that action at this time.
0 commit comments