Request a spot price from executable streaming prices (ESP).
- Your REST API app.
- Integral API login with trading permission.
- Your organization provisioned with at least one provider who streams ESP spot prices.
Use the Login and get token endpoint.
See the related Login tutorial.
Your access token is in SSO_TOKEN of the response header. Your token is valid for limited time.
Pass the SSO_TOKEN cookie value with all of your subsequent API requests.
- https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/sso/login 
- Payload
- JavaScript
{ "user": "apiUserId", "pass": "This is a long password!", "org": "apiOrganizationId" }
Use the Get spot rate by symbol endpoint.
Use the rateId attribute of the JSON response in the next step.
- Mock serverhttps://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/rates/spot 
- https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/rates/spot 
const query = new URLSearchParams({symbol: 'EUR/USD'}).toString();
const resp = await fetch(
  `https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/rates/spot?${query}`,
  {
    method: 'GET',
    headers: {
      SSO_TOKEN: 'YOUR_API_KEY_HERE'
    }
  }
);
const data = await resp.text();
console.log(data);Use the rateId attribute of the response when you place your order.
- https://3ac93db9-6290-458d-9482-0dc0a0e9607a.remockly.com/v2/orders 
- Payload
- JavaScript
{ "coId": "pq11233", "rateId": "4HProduct|2022-11-14|0800-1200|EURUSD|SPOT", "currency": "EUR", "size": 9000000, "type": "PQ", "price": 1.1652, "side": "Buy", "symbol": "EUR/USD", "timeInForce": "FOK" }