WEBHOOK

Authorizations

Authorization
string
header
required

The end user's JWT access token, sent as Authorization: Bearer <token>.

Obtain one from POST /partner/customers or POST /partner/customers/login — both return it as token. It identifies which of your users a call is made for, and is sent alongside your X-API-Key on every authenticated endpoint.

Event discovery, categories, subcategories and scores are public and need no token.

X-API-Key
string
header
required

ISV / partner credential — public half. Required on every request.

Identifies the integration partner (ISV) making the call. Issued by Dime Trades when the ISV is onboarded and sent on every /partner/* endpoint:

  • On the two partner endpoints that create accounts or issue tokens (POST /partner/customers, POST /partner/customers/login), it is accompanied by X-API-Secret and is the only authentication — there is no user token yet.
  • On every other partner endpoint it is sent alongside the user's Authorization: Bearer <token>: the API key says which platform is calling, the bearer token says which user it is calling for.

Credentials are scoped to one or more brands; using a key with a brandId outside that scope returns 403. Staging and production keys are separate. The key identifies your platform — treat it as a backend credential.

Body

application/json

The payload DimeTrades sends to your webhookUrl.

Every webhook delivery shares this envelope. id is stable across retries — use it to dedupe. data varies per type; see each webhook page.

id
string<uuid>
required

Stable per-event id. Identical across delivery retries — dedupe on this.

type
string
required

One of the webhook event names, e.g. order.filled, trade.executed.

createdAt
string<date-time>
required
data
object
required

Event-specific payload — see the individual webhook for its shape. Every order.*, trade.executed and wallet.* event carries orderId, clientOrderId (the key you supplied on POST /orders; null only for an order placed without one), marketId, eventId (the event the market belongs to) and externalCustomerId (your own id for the customer, as supplied when you registered them), so you can correlate on your own keys without a lookup. The exception is a wallet.credit with reason: market_settlement, which has no order behind it and carries marketId and positionId instead.

Response

200

Return any 2xx to acknowledge receipt. Anything else (including a timeout) is treated as a delivery failure and retried.