Notifications
Yoyo Market (hereinafter “Yoyo”) sends notifications to keep you informed about your trading activity and event outcomes. All notification endpoints require authentication.
Notification Types
| Type | Description |
|---|---|
bet_placed | Confirms that your order was successfully placed on a market. |
bet_won | Your position resolved in your favor and winnings have been credited. |
bet_lost | Your position resolved against you. |
event_closed | An event you participated in or watched has been closed and settled. |
Fetching Notifications
All Notifications
GET /api/v1/notifications
Returns your complete notification history, both read and unread.
Unread Notifications Only
GET /api/v1/notifications/unread
Returns only notifications you have not yet marked as read.
Unread Count
GET /api/v1/notifications/unread/count
Returns a single integer count of unread notifications. Useful for displaying a badge in the UI without fetching full notification data.
Managing Notifications
Mark All as Read
PUT /api/v1/notifications/read-all
Marks every unread notification as read in a single operation.
Mark One as Read
PUT /api/v1/notifications/{id}/read
Marks a specific notification as read.
Path parameters:
| Parameter | Description |
|---|---|
id | The UUID of the notification to mark as read. |
Delete a Notification
DELETE /api/v1/notifications/{id}
Permanently removes a notification from your history.
Path parameters:
| Parameter | Description |
|---|---|
id | The UUID of the notification to delete. |
Summary of Endpoints
| Method | Endpoint | Auth | Description |
|---|---|---|---|
GET | /api/v1/notifications | Required | List all notifications |
GET | /api/v1/notifications/unread | Required | List unread notifications |
GET | /api/v1/notifications/unread/count | Required | Get unread count |
PUT | /api/v1/notifications/read-all | Required | Mark all as read |
PUT | /api/v1/notifications/{id}/read | Required | Mark one as read |
DELETE | /api/v1/notifications/{id} | Required | Delete a notification |