Subscription Request
Subscribe method. Must be
subscribeArray of topics to subscribe to. Must include
user_tradesExample: ["user_trades"]Ticket created using the endpoint POST https://api.ripio.com/trade/ticket
Stream Response
Each WebSocket message includes a sequential numeric id. Each topic has its own unique sequence, and for private topics, the sequence is unique to each topic and user. It’s important to note that some topics will send a “welcome message”, which will have an id value of -1. Additionally, this sequence may be reset between connections, so be sure to update this value locally whenever you reconnect.
Topic name (always
user_trades)Timestamp in milliseconds
Trade execution details
Subscription Example
Stream Response Example - You as Taker
Stream Response Example - You as Maker
Maker vs Taker Explained
Taker
- Your incoming order matched with an existing order in the book
- Usually pays higher fees
- Typically executed immediately
Maker
- Your order was already in the order book
- Usually receives better fees
- Waited for another order to match
Key Fields
| Field | Description |
|---|---|
| amount | How much was traded |
| price | At what price it was executed |
| fee | Commission charged |
| side | Whether you were buying or selling |
| taker_or_maker | Your role in this trade |
| total_value | amount × price |
Fee Implications
- Maker: Often lower fees (liquidity provider)
- Taker: Often higher fees (market taker)
- Fee Currency: May be different from trade pair
- Fee Rebates: Some exchanges offer maker rebates
Calculation Examples
Usage Notes
- Authentication Required: Requires valid ticket from WebSocket authentication
- Real-time Updates: Receive immediate notification when your trades execute
- Both Sides: You get notified whether you’re buyer or seller
- Order Correlation: Link trades back to your orders
- Fee Information: Complete fee details included
- Timestamp: Use for accurate trade recording
You Receive Notifications For
- Trades where your market order hit existing orders
- Trades where your limit order was matched
- Both partial and full fills of your orders
- Trades from any of your active orders
Use Cases
- Trade Recording: Record all trades in real-time
- P&L Tracking: Calculate profit/loss as trades execute
- Fee Accounting: Track fees paid per trade
- Order Confirmation: Verify order fills
- Automated Trading: React to trade fills
- Reporting: Generate trade reports automatically
- Reconciliation: Reconcile with exchange records