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.
Endpoints
Every feature you need, exposed via API
Avg Response
Optimized for high-frequency operations
Uptime SLA
Guaranteed availability for production use
Dev Support
Dedicated technical assistance
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
https://api.fxtrusts.com/v2https://sandbox-api.fxtrusts.com/v2OAuth 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.
In your dashboard, go to Settings → API → Create Application. Note your Client ID and Client Secret.
POST to /oauth/token with your credentials to receive an access token and refresh token.
Add Authorization: Bearer YOUR_TOKEN header to all API requests.
Never expose your Client Secret in client-side code. Access tokens should be treated as sensitive credentials and stored securely.
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
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:
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.
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.
Requests / Minute
Standard rate limit for most endpoints
Burst / Second
Maximum concurrent requests per second
Quotes / Second
Separate limit for real-time price quotes
Rate Limit Headers
X-RateLimit-LimitYour request limit per minuteX-RateLimit-RemainingRequests remaining in current windowX-RateLimit-ResetUnix timestamp when the limit resetsWe 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/sdkPython
pip install fxtrustsPHP
composer require fxtrusts/sdkC# / .NET
Install-Package FxTrusts.SDKAdditional 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.
