Skip to content

Commit b1c86cb

Browse files
committed
update readme
1 parent b70341e commit b1c86cb

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

README.md

+20-7
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ $ curl localhost:8080/v2/orders -X POST \
251251
Returns solana tx signature on success
252252

253253
### 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.
255255

256256
- `amount` can be modified to flip the order from long/short to bid/ask
257257
- the order market cannot be modified.
@@ -260,14 +260,18 @@ $ curl localhost:8080/v2/orders -X PATCH \
260260
-H 'content-type: application/json' \
261261
-d '{
262262
"orders": [{
263+
"marketIndex": 0,
264+
"marketType": "perp",
263265
"amount": -1.1,
264266
"price": 80.5,
265267
"userOrderId": 101
266268
},
267269
{
268-
"amount": 1.05,
270+
"marketIndex": 1,
271+
"marketType": "spot",
272+
"amount": 2.05,
269273
"price": 61.0,
270-
"orderId": 32
274+
"userOrderId": 32
271275
}]
272276
}'
273277
```
@@ -286,10 +290,10 @@ $ curl localhost:8080/v2/orders -X DELETE
286290
```
287291
Returns solana tx signature on success
288292

289-
### Cancel and Place Orders
293+
### Atomic Cancel/Modify/Place Orders
290294

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
293297

294298
```bash
295299
$ 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
298302
"marketIndex": 0,
299303
"marketType": "perp"
300304
},
305+
"modify": {
306+
"orders": [{
307+
"marketIndex": 0,
308+
"marketType": "perp",
309+
"orderId": 555,
310+
"amount": -0.5,
311+
"price": 82.0
312+
}]
313+
},
301314
"place": {
302315
"orders": [
303316
{
304317
"marketIndex": 0,
305318
"marketType": "perp",
306319
"amount": -1.23,
307-
"price": 80.0,
320+
"price": 99.0,
308321
"postOnly": true,
309322
"orderType": "limit",
310323
"immediateOrCancel": false,

0 commit comments

Comments
 (0)