Skip to main content
This topic is responsible for notifying the user every time one of its orders is updated (created, executed, canceled).
This is an authenticated stream. You must provide a valid ticket from authentication to subscribe.

Subscription Request

method
string
required
Subscribe method. Must be subscribe
topics
array
required
Array of topics to subscribe to. Must include order_statusExample: ["order_status"]
ticket
string
required
Ticket created using the endpoint POST https://api.ripio.com/trade/ticket

Stream Response

id
integer
Message identifier
topic
string
Topic name (always order_status)
timestamp
integer
Server timestamp in milliseconds
body
object
Order status details object

Subscription Example

{
  "method": "subscribe",
  "topics": [
    "order_status"
  ],
  "ticket": "97794B95-AFE7-454F-81B0-9109112548C2"
}

Stream Response Example - Order Created

{
  "id": 7,
  "topic": "order_status",
  "timestamp": 1672856713677,
  "body": {
    "id": "F55E4E01-C39B-4AA7-848B-1C6A362C386E",
    "status": "open",
    "type": "limit",
    "side": "buy",
    "pair": "ETH_BRL",
    "price": 6,
    "amount": 4,
    "executed_amount": 0,
    "remaining_amount": 4,
    "average_execution_price": 0,
    "external_id": null,
    "user_id": "30B8CDBB-BDBD-4B60-A90F-860AB46B76F7",
    "created_at": "2023-01-24T17:28:32.247Z",
    "updated_at": "2023-01-24T17:28:32.247Z"
  }
}

Stream Response Example - Order Partially Executed

{
  "id": 8,
  "topic": "order_status",
  "timestamp": 1672856714000,
  "body": {
    "id": "F55E4E01-C39B-4AA7-848B-1C6A362C386E",
    "status": "executed_partially",
    "type": "limit",
    "side": "buy",
    "pair": "ETH_BRL",
    "price": 6,
    "amount": 4,
    "executed_amount": 2.5,
    "remaining_amount": 1.5,
    "average_execution_price": 6,
    "external_id": null,
    "user_id": "30B8CDBB-BDBD-4B60-A90F-860AB46B76F7",
    "created_at": "2023-01-24T17:28:32.247Z",
    "updated_at": "2023-01-24T17:28:33.000Z"
  }
}

Stream Response Example - Order Fully Executed

{
  "id": 9,
  "topic": "order_status",
  "timestamp": 1672856714500,
  "body": {
    "id": "F55E4E01-C39B-4AA7-848B-1C6A362C386E",
    "status": "executed_completely",
    "type": "limit",
    "side": "buy",
    "pair": "ETH_BRL",
    "price": 6,
    "amount": 4,
    "executed_amount": 4,
    "remaining_amount": 0,
    "average_execution_price": 6,
    "external_id": null,
    "user_id": "30B8CDBB-BDBD-4B60-A90F-860AB46B76F7",
    "created_at": "2023-01-24T17:28:32.247Z",
    "updated_at": "2023-01-24T17:28:33.993Z"
  }
}

Order Status Lifecycle

open → executed_partially → executed_completely

canceled
  • open: Order created and waiting to be matched
  • executed_partially: Order has been partially filled
  • executed_completely: Order has been fully filled
  • canceled: Order was canceled before full execution

Key Fields

FieldDescription
statusCurrent order state
executed_amountHow much has been filled
remaining_amountHow much is still pending
average_execution_priceWeighted average price of fills
external_idYour custom order identifier

Usage Notes

  • Authentication Required: Requires valid ticket from WebSocket authentication
  • Real-time Updates: Receive immediate notification when order status changes
  • Order Tracking: Track all your orders in real-time
  • Multiple Orders: You’ll receive notifications for all your orders
  • Complete History: Each notification includes all order details

Use Cases

  • Order Monitoring: Track all your orders in real-time
  • Portfolio Updates: Update portfolio when orders execute
  • Alerts: Trigger alerts when orders fill
  • Accounting: Record trades as they execute
  • Automated Trading: React to order fills programmatically