Skip to main content

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

ParameterTypeRequiredDefaultDescription
tickerstringYes-Ticker code for instrument, e.g. BTCUSDT
timestampISO datetimeNonowDatetime of event, used if event is historical
exchangestringNoDepends on instrument typeUsed to specify exchange for more accurate analysis using exchange specific data, e.g. BINANCE
directionstringNoBUYDirection of trade (BUY or SELL)
position_sizefloatNo1Number 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_pctfloatNo0Between 0 and 1, cost assumption for entry and exit
benchmark_tickerstringNoOverall market for universeSpecific ticker to benchmark against, must be in same universe as ticker
custom_messagestringNo-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