Sway Charts API Documentation
  • REST API Specification
    • Getting Started
      • Introduction
      • Errors
      • API Versioning
      • Conditional Requests & Updates
      • Entity Versioning
      • Data Types and Formats
      • Rate Limits & Throttling
    • Authentication & Authorization
      • HMAC Authentication
      • POST Create Session Token
      • POST Ping
      • POST Logout
    • Trading
      • POST Place Order
      • PUT Modify Order
      • DELETE Cancel Order
    • Reference Data
      • GET List Instruments
      • List Instrument Details
    • Users and Accounts
      • GET Get Users
      • GET List Account Portfolio
      • GET List Open Positions
      • GET List Open Orders
      • GET List Cash Transfers
      • GET POST List Orders
      • GET List Account Metrics
      • GET List Account Events
    • Market Data
      • POST Request Market Data
    • Conversion Rates
      • POST Get Conversion Rates
    • Cash Transaction
      • Single Order Request
      • Order Group Request
      • Order Response
      • Instrument
      • Instrument Details
      • Trading Session
      • Limit Value
      • Margin Rate
      • Margin Tier
      • User Details
      • Account Details
      • Account Portfolio
      • Balance
      • Position
      • Order
      • Order Leg
      • Execution
      • Cash Transfer
      • Historic Order List
      • Account Metrics
      • Position Metrics
      • Currency Metrics
      • Account Event
      • Market Data Request
      • Market Data Event Type
      • Market Data List
      • Quote
      • Candle
      • Conversion Rate
    • Revision History
Powered by GitBook
On this page
  1. REST API Specification
  2. Getting Started

Introduction

PreviousGetting StartedNextErrors

Last updated 1 year ago

The API uses the standard HTTP verbs over HTTP/1.1 and returns JSON (application/json) or XML (application/xml) responses accompanied by standard HTTP error codes.

The Sway Charts REST API supports only the following HTTP verbs:

  • - to retrieve data from the system; this method doesn't change the system in any way and is considered idempotent.

  • - to create new entities or perform actions in the system; this method changes the system state and cannot be repeated without undesired side effects; method is considered not idempotent.

  • - to update the complete state of an entity. This method changes system state and is idempotent.

  • - to delete or discontinue an entity. This method changes the system state and is idempotent.

All the requests are made strictly over HTTPS, calls over HTTP will be rejected. Unless specified, all the requests require authentication - see and .

The Sway Charts REST API is a synchronous request-response API. As the API is based on HTTP protocol, no realtime notifications are provided. Push notifications are described in a .

The Sway Charts REST API provides functionality for:

  • Non-disclosed integration when there is a single source of orders which uses the API to trade on behalf of multiple users who are not visible to the Sway Charts platform. All the trades a partner makes are allocated on a single account in the system.

  • "Gateway" disclosed integration when there is a single source of orders which uses the API to trade on behalf of multiple users who are visible to the platform. All the trades a partner makes are allocated on multiple accounts in the system; there is a record for each account. But the orders and information flows via a single connection; clients are not connected to the system directly but are connected to partner's system.

  • "Direct" disclosed integration when partner's users are connected directly to the Sway Charts backend; there is a separate connection for each user. The system has a record for each account.

JSON is the default representation and request format. If the Accept header sent by the client prohibits both XML and JSON format, the server responds with the 406 Not Acceptable status code. See also .

The Sway Charts REST API supports the standard HTTP gzip and deflate compression methods. Client's preference is communicated via the Accept-Encoding header.

Basic Auth
HMAC auth
separate document
error handling