Harbor SDK
order
Create, amend, and cancel go through rt.order. Every request passes platform risk checks before it can reach an exchange. The strategy does not see keys or raw errors that contain keys.
| Method | Arguments | Result |
|---|---|---|
| create | clientOrderId, symbol, side, type, amount, plus price for a limit | returns an order id |
| amend | clientOrderId, and price or amount | changes an open order |
| cancel | clientOrderId | cancels that order |
| cancelAll | none | cancels this strategy's open orders |
- side is buy or sell. type is market or limit.
- You choose clientOrderId. Reuse it when the same intent is submitted again so it does not fill twice.
- amount and price are strings.
- manifest.permissions must include order.
await rt.order.create({
clientOrderId: "ord-1",
symbol,
side: "buy",
type: "limit",
amount: "0.01",
price: "60000",
});