GuidesAPI Reference
StudioOlympusLog In
API Reference

This WebSocket channel provides you a updates related to your trading activity. Please see our WebSocket guide for information on Authentication with WebSockets and common messages.

This channel contains sequenced messages, which are messages that contain a sequence field indicating the order for the message. This is a monotonic sequence number you can use to detect gaps and validate ordering of messages. After you subscribe to this channel, you will get a replay of all sequenced messages from the beginning of the day.

Messages that do not contain a sequence field are not sequenced and therefore are not replayed.

Subscribe Activity

You send the following message when you want to subscribe to this channel for a particular account.

{
  "authorization": "<access-token>", 
  "payload": {
    "type": "subscribe-activity",
    "account_id": "<account-id>"
  }
}
FieldTypeRequiredDescription
authorizationstringYesYour access token.
payload.typestringYesAlways subscribe-activity.
payload.account_idstringYesAccount you want to subscribe to.

Subscribe Activity Ack

You receive this message to indicate success or failure of the subscription request you sent. Note, if your request is malformed or otherwise not parsable, you'll instead get an Error Notice.

{
  "timestamp": 1711076847030,
  "payload": {
    "type": "subscribe-activity-ack",
    "account_id": "<account-id>",
    "success": true,
    "details": "Subscribed successfully"
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
payload.typestringYesAlways subscribe-activity-ack.
payload.account_idstringYesThe account you sent in your request echoed back.
payload.successbooleanYesTrue if successful, false otherwise.
payload.detailsstringYesAdditional details.

Replay Complete

You receive this message after all sequenced messages have been replayed. Sequenced messages are automatically replayed after your subscribe to this channel. This message lets you know that the replay is complete.

{
  "timestamp": 1711076847030,
  "payload": {
    "type": "replay-complete"
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
payload.typestringYesAlways replay-complete.

Order Update

You receive this message anytime an order changes state.

{
  "timestamp": 1711076847030,
  "sequence": 123,
  "payload": {
    "type": "order-update",
    "data": {...}
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
sequencenumberYesMonotonic sequence number.
payload.typestringYesAlways order-update.
payload.dataobjectYesOrder object in the same shape as the response to Get Order.

Trade Notice

You receive this message anytime an open order is executed against.

{
  "timestamp": 1711076847030,
  "sequence": 124,
  "payload": {
    "type": "trade-notice",
    "data": {...}
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
sequencenumberYesMonotonic sequence number.
payload.typestringYesAlways trade-notice.
payload.dataobjectYesTrade object in the same shape as the response to Get trade.

Position Update

You receive this message anytime your position in a symbol changes.

{
  "timestamp": 1711076847030,
  "sequence": 124,
  "payload": {
    "type": "position-update",
    "data": {...}
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
sequencenumberYesMonotonic sequence number.
payload.typestringYesAlways position-update.
payload.dataobjectYesPosition object in the same shape as the response to Get position

Buying Power

You receive this message when your buying power changes, if applicable.

{
  "timestamp": 1711076847030,
  "sequence": 124,
  "payload": {
    "type": "buying-power-update",
    "data": {...}
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
sequencenumberYesMonotonic sequence number.
payload.typestringYesAlways buying-power-update.
payload.dataobjectYesBuying power update details.

Locate Inventory

You receive this message when your locate inventory changes, if applicable.

{
  "timestamp": 1711076847030,
  "sequence": 124,
  "payload": {
    "type": "locate-inventory-update",
    "data": {...}
  }
}
FieldTypeRequiredDescription
timestampnumberYesMilliseconds since epoch timestamp of when the server sent the message.
sequencenumberYesMonotonic sequence number.
payload.typestringYesAlways locate-inventory-update.
payload.dataobjectYesLocate inventory update details.