Webhook POST request specs
Events are communicated to Cyborg using a POST request. POST requests contain a body parameter (in a JSON format), which communicates the information through to an endpoint.
Cyborg only has one public facing endpoint, which is described below.
HTTP Request
POST /integration_events/{webhook_id}
Request Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
ticker | string | Yes | - | Ticker code for instrument, e.g. BTCUSDT |
timestamp | ISO datetime | No | now | Datetime of event, used if event is historical |
exchange | string | No | Depends on instrument type | Used to specify exchange for more accurate analysis using exchange specific data, e.g. BINANCE |
direction | string | No | BUY | Direction of trade (BUY or SELL ) |
position_size | float | No | 1 | Number of units traded. Negative values indicate SELL. Used by scalability calculations to take your order size into consideration. Its also used in the portfolio analysis calculations (enterprise only) |
cost_pct | float | No | 0 | Between 0 and 1, cost assumption for entry and exit |
benchmark_ticker | string | No | Overall market for universe | Specific ticker to benchmark against, must be in same universe as ticker |
custom_message | string | No | - | User defined message to display on event |
Example Request
POST /integration_events/u13dfjjjjd992920fjadsfa HTTP/1.1
body: {
"ticker": "AAPL",
"timestamp": "2023-07-06T10:00:00Z",
"exchange": "NASDAQ",
"direction": "BUY",
"position_size": 100,
"cost_pct": 0.01,
"benchmark_ticker": "SPY",
"custom_message": "This is a custom message for the event."
}
List of accepted date formats
- ISO 8601 format: "2023-07-06T10:00:00Z"
- Date with time: "2023-07-06 10:00:00"
- Date with abbreviated month: "06 Jul 2023"
- Date with full month name: "06 July 2023"
- Date with time and timezone: "2023-07-06 10:00:00 +0300"
- Date with time and timezone offset: "2023-07-06 10:00:00 +03:00"
List of accepted exchanges
Note: Exchanges will be fuzzy matched if no exact match is found.
US Exchanges
- NYSE
- NASDAQ
AU Exchanges
- ASX
Supported Crypto Exchanges
- BINANCE
- BITMEX
- BYBIT
- COINBASE
- KRAKEN
- OKX