trade_feed, or one of your platform users, within your plan’s user limit. Every endpoint takes the user’s csid_id or, for one of your platform users, your own external_id.
trader is always a handle (with or without @) or a csid_id. For one of your own platform users, pass trader_external_id instead.
Get the feed
GET /v1/trade-feed
The user’s Trade Feed, newest first: every trade and thesis of the traders in it. Traders who made their trading private are left out.
Query Parameters
string
The user’s CabalSpy ID. Alternatively pass external_id.
string
Your own user id, for one of your platform users.
string
default:"all"
all, buys, sells or theses.integer
default:"30"
Items per page, 1 to 100.
string
Cursor for the next page, the pagination.next_cursor from the previous response.
string
Your Instance ID. Only needed when your account has several instances.
string
required
Your API key. Alternatively pass it as an Authorization Bearer header.
Usage Example
Response
array
Trade items and thesis items, newest first. Each also carries
cursor, its position in the feed.object
limit, has_more and next_cursor (pass it as cursor; null on the last page).
Errors
The trade item
string
The trade’s id, the same everywhere it appears (feed, webhook, stream, notifications).
string
trade.string
When the trade happened.
object
csid_id, username, name, image_url, kol and profile_url. username and profile_url are null for platform users.
object
object
token (the CabalSpy Terminal on Solana and BNB Chain, otherwise the token’s theses on CabalSpy ID), terminal (null outside Solana and BNB Chain) and profile.
The thesis item
string
h followed by the thesis id.string
thesis.object
As for a trade.
object
id, blockchain, mint, symbol, name, logo, stance (
bull, bear or null), body, likes, replies and url. See Token theses.List traders
GET /v1/trade-feed/traders
The traders in the user’s Trade Feed, most recently added first, with the user’s alert and copy settings for each.
Query Parameters
string
The user’s CabalSpy ID. Alternatively pass external_id.
string
Your own user id, for one of your platform users.
integer
default:"100"
Traders per page, 1 to 300.
string
Cursor for the next page.
string
required
Your API key. Alternatively pass it as an Authorization Bearer header.
Response
array
object
limit, total (traders in the Trade Feed), max (300), has_more and next_cursor.
Response
Add a trader
POST /v1/trade-feed/traders
Adds a trader to the user’s Trade Feed, with the user’s default alert settings unless you pass others. Answers 201 when the trader was added, 200 when they were already there; then the settings you pass are updated.
Body
string
The user’s CabalSpy ID. Alternatively pass external_id.
string
The user, by your own user id.
string
required
Handle (with or without @) or csid_id. Alternatively pass trader_external_id.
string
One of your own platform users, by your user id.
boolean
Alerts for buys, sells and theses of this trader.
number
Minimum trade size in the native coin for alerts, 0 to 1,000,000. 0 means every trade.
boolean
No alerts for this trader.
Response
Errors
Remove a trader
POST /v1/trade-feed/traders/delete
Removes a trader from the user’s Trade Feed. This also ends copying of that trader. removed is false when the trader was not in the Trade Feed.
Body
string
The user’s CabalSpy ID. Alternatively pass external_id.
string
The user, by your own user id.
string
required
Handle or csid_id. Alternatively pass trader_external_id.
Response
Notifications
GET /v1/trade-feed/notifications
The user’s recent Trade Feed alerts, newest first: every trade and thesis that passed the user’s filters for that trader. Useful to show an alert inbox when you do not use webhooks.
Query Parameters
string
The user’s CabalSpy ID. Alternatively pass external_id.
string
Your own user id, for one of your platform users.
integer
default:"50"
Alerts per page, 1 to 100.
string
Cursor for the next page.
string
required
Your API key. Alternatively pass it as an Authorization Bearer header.
array
id (a number), event (
trade_feed.trade or trade_feed.thesis), text (a ready-made line in plain text), created_at and data (the trade item or thesis item).Response
Live stream
wss://api-id.cabalspy.xyz/v1/trade-feed/stream?api_key=YOUR_KEY
Every new trade and thesis that concerns your users, live, on every plan. Each event says which of your users to tell: recipients lists the csid_id of your users who have the trader in their Trade Feed and whose filters let the event through, and recipients_external your own ids of those who are platform users. Events nobody of yours should get are not sent.
Pass the key as api_key, apiKey or an Authorization Bearer header, and instance when your account has several instances.
trade_feed.trade
ping at any time for a pong. After 30 seconds of silence the server sends a heartbeat and checks that your key is still valid. Each API key can hold at most 5 Trade Feed stream connections, counted separately from the other streams; more get too_many_connections. Events made while you were disconnected are not replayed; read Notifications or the feed to catch up.
The same events are available as webhooks.
