Documentation

Introduction

A reference library for wiring Trading Layer into your stack.

Written for the engineer sitting down to integrate on a Friday afternoon — precise, lean, and opinionated about what matters. What an endpoint should do, which events you can subscribe to, and how to verify that a payload actually came from us.

01

The scope

What you get from this section.

This first volume is intentionally small — the goal is to answer the three questions every team has on day one, not to pad the page with generic API hand-waving.

REST API

Interactive endpoint reference.

Browse every public MT5 route, request schema, response envelope, and executable Scalar example from the generated OpenAPI spec.

Read the guide
Webhooks

Outbound events, not polls.

Trader and signal lifecycle events are pushed to your endpoint the moment they happen — no polling, no drift, no missed states.

Read the guide
Signatures

HMAC-SHA256 with timestamp.

Every delivery carries a signed header. POST signs the raw body; GET signs the canonical query string.

Read the guide
Retries

Backoff and manual replay.

Failed deliveries are retried with exponential backoff; anything that dies for good can be replayed by hand from the dashboard.

Read the guide
02

Orientation

Suggested reading order.

If you're wiring a receiver from scratch, take these in sequence — each page assumes the one before it.

03

Etiquette

A few house rules.

Small conventions that make webhook receivers calm instead of flaky.

Return quickly.

Respond 2xx within a few seconds and push slow work — emails, DB writes, downstream calls — to your own background queue.

Verify the signed payload.

For POST, store the raw body before parsing. For GET, rebuild the canonical query string before checking the signature.

Deduplicate by event id.

We may retry. Treat every delivery as 'at least once' and idempotent on the X-Webhook-Event-Id header.

Log the headers.

When a delivery misbehaves, the signature header and your local clock are the first two things we'll ask about.