Skip to content
Last updated

The Fig Markets API provides two interfaces for integrating with your applications:

  • REST over HTTPS for performing actions against the Fig platform
  • JSON-RPC WebSockets for real-time notifications/updates

Access to the API

To access the API, you will need to be onboarded to Fig Markets and have a login to our trading platform. If you do not yet have an account please reach out to the team directly:

Once you have access to our platform, a trader admin on your account can log in and generate one or more API keys, each made up of a client ID and a client secret. You can then use your API keys to authenticate with the API.

Authentication

REST API

The REST API uses OAuth 2.0 for authentication so your application will follow an OAuth 2.0 flow, using your generated API keys, to obtain an access token which will then be sent as Authorization: Bearer <token> with each request. Each request must also be signed.

WebSockets

To authenticate a WebSocket connection, send either an access token or your API key's clientId and clientSecret in a JSON-RPC message to the auth method. Your app must also send a heartbeat message to the server every 30 seconds, from the moment the connection opens, to keep the connection alive.

You can find more information on how to authenticate with the API in the Authentication Guide.

Environments

There is both a production and test environment for the Fig API. The endpoints for these environments are:

Production

Test

Security

The Fig Markets API has optional IP Whitelisting against API keys and also uses HMAC-SHA256 signature verification against requests. For further information about these security features please see: