Developer Portal

API Documentation.
For Those Who Build.

You're not here to click buttons in a dashboard. You're here to integrate, automate, and build. Our REST API gives you programmatic access to everything—from account creation to trade execution. Let's get technical.

100+

Endpoints

Every feature you need, exposed via API

<50ms

Avg Response

Optimized for high-frequency operations

99.9%

Uptime SLA

Guaranteed availability for production use

24/7

Dev Support

Dedicated technical assistance

API OVERVIEW

RESTful, Predictable, Boring

No weird proprietary protocols. No SOAP (thank god). Just standard REST with JSON payloads, sensible HTTP verbs, and OAuth 2.0 authentication. If you've integrated with any modern API, you already know 90% of ours.

  • JSON Request & Response Bodies
  • Standard HTTP Status Codes
  • OAuth 2.0 Client Credentials Flow
  • HATEOAS Pagination
Base URLs
Production:https://api.fxtrusts.com/v2
Sandbox:https://sandbox-api.fxtrusts.com/v2
AUTHENTICATION

OAuth 2.0—Because API Keys Are So 2010

We use OAuth 2.0 client credentials flow. Obtain an access token using your Client ID and Secret, then include it as a Bearer token in all subsequent requests. Tokens expire after 1 hour. Refresh tokens last 30 days.

1
Create API Application

In your dashboard, go to Settings → API → Create Application. Note your Client ID and Client Secret.

2
Exchange Credentials

POST to /oauth/token with your credentials to receive an access token and refresh token.

3
Include Bearer Token

Add Authorization: Bearer YOUR_TOKEN header to all API requests.

Security Warning

Never expose your Client Secret in client-side code. Access tokens should be treated as sensitive credentials and stored securely.

CORE ENDPOINTS

The Endpoints You'll Actually Use

We have 100+ endpoints, but let's be honest—you're here for accounts, clients, transactions, and trades. Here's the essential reference.

Clients

  • GET /clients — List all clients
  • POST /clients — Create client
  • GET /clients/:id — Get client
  • PATCH /clients/:id — Update client
  • GET /clients/:id/accounts — Client accounts

Accounts

  • GET /accounts — List accounts
  • POST /accounts — Create account
  • GET /accounts/:id — Get account
  • PATCH /accounts/:id — Update account
  • DEL /accounts/:id — Disable account

Transactions

  • GET /transactions — List transactions
  • POST /transactions/deposit — Create deposit
  • POST /transactions/withdrawal — Create withdrawal
  • GET /transactions/:id — Get transaction
  • PATCH /transactions/:id — Update status

Trading

  • GET /trades — List trades
  • GET /positions — Open positions
  • GET /orders — Pending orders
  • GET /symbols — Trading symbols
  • GET /quotes/:symbol — Real-time quote
WEBHOOKS

Real-Time Events.
Stop Polling Like It's 2005.

Instead of hammering our API every 5 seconds to check if something changed, let us push events to you. Configure webhook endpoints, subscribe to events, and react in real-time.

Available Events:

client.created
client.verified
account.created
transaction.created
transaction.completed
trade.opened
trade.closed
margin.call
stop.out

Security

All webhooks include an HMAC signature (X-FxTrusts-Signature) so you can verify the payload originated from us.

Retry Policy

If your endpoint fails, we retry with exponential backoff: 1min → 5min → 30min → 2hrs → 24hrs. Max 5 attempts.

RATE LIMITS

Don't DDoS Us, Please

We're generous with our limits, but not infinite. Here's what you get—exceed it and you'll see HTTP 429. Check the headers to know your remaining quota.

1,000

Requests / Minute

Standard rate limit for most endpoints

50

Burst / Second

Maximum concurrent requests per second

100

Quotes / Second

Separate limit for real-time price quotes

Rate Limit Headers

X-RateLimit-LimitYour request limit per minute
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the limit resets
SDKs & LIBRARIES

We Wrote the Code So You Don't Have To

Official SDKs for popular languages. Type-safe, well-documented, and maintained by our team. Or just use curl if that's your thing.

JavaScript / TypeScript

npm install @fxtrusts/sdk

Python

pip install fxtrusts

PHP

composer require fxtrusts/sdk

C# / .NET

Install-Package FxTrusts.SDK

Additional Resources

Postman Collection

Import our collection to explore endpoints with pre-configured auth and sample requests.

GitHub Examples

Full code samples covering client management, deposits, withdrawals, and reporting.

OpenAPI Spec

Download our OpenAPI 3.0 specification for code generation and documentation tools.

Ready to Build?

Get your API credentials from the dashboard and start integrating. Our dev support team is available 24/7 if you get stuck.