# Spot trading # Spot web API V1 # Introduction - The base endpoint is: **[https://api.infinex.cc/spot](https://api.infinex.cc/spot)** - All parameters should be encoded as JSON object and sent in request body using the POST method - Some endpoints will require an API Key, which can be generated in the Infinex account settings - **Never share your API key to ANYONE** # Error handling {{@12}} # Endpoints list ## Markets list and price tickers ``` POST /markets POST /markets_ex ```
Parameter | Type | Description |
---|---|---|
`pair` | `string` | *Optional*. Provide pair symbol if you want to get informations only about single pair |
`quote` | `string` | *Optional*. Provide quote asset symbol if you want to get informations only about pair quoted to this asset |
`search` | `string` | *Optional*. Provide arbitrary string to search in markets list |
`sort` | `string` | *Optional*. Sort response items by: `name`, `price`, `change` or `volume` |
`sort_dir` | `string` | *Optional*. Sort direction: `asc` or `desc` |
`offset` | `int` | *Optional*. Number of rows to skip. |
Field | Type | Description |
---|---|---|
`pair` | `string` | Pair symbol |
`base` | `string` | Base asset symbol |
`quote` | `string` | Quote asset symbol |
`icon_url` | `string` | Base asset icon URL |
`price` | `string` | Current market price |
`change` | `string` | Percentage price change in last 24 hours, can be negative |
`previous` | `string` | Previous market price, can be used to determinate color of displayed price |
Field | Type | Description |
---|---|---|
`base_name` | `string` | Full name of base asset |
`quote_name` | `string` | Full name of quote asset |
`base_precision` | `int` | Number of decimal places of base asset |
`quote_precision` | `int` | Number of decimal places of quote asset |
`high` | `string` | Highest price for last 24 hours |
`low` | `string` | Lowest price for last 24 hours |
`vol_base` | `string` | 24 hours trading volume in base asset |
`vol_quote` | `string` | 24 hours trading volume in quote asset |
`min_order` | `string` | Minimal order quantity in quote asset |
Parameter | Type | Description |
---|---|---|
`pair` | `string` | **Required**. Trading pair symbol |
Field | Type | Description |
---|---|---|
`price` | `string` | Price level |
`amount` | `string` | Aggregated orders amount |
Parameter | Type | Description |
---|---|---|
`pair` | `string` | **Required**. Trading pair symbol. |
`offset` | `int` | **Required**. Number of rows to skip. |
Field | Type | Description |
---|---|---|
`time` | `string` | Unix timestamp |
`price` | `string` | Trade price |
`amount` | `string` | Trade amount in base asset |
`total` | `string` | Trade amount in quote asset |
`side` | `string` | `BUY` or `SELL`\* |
Parameter | Type | Description |
---|---|---|
`pair` | `string` | **Required**. Trading pair symbol. |
`res` | `string` | **Required**. Time buckets resolution: `1` - 1 minute, `60` - 1 hour, `1D` - 1 day. |
`from` | `int` | **Required**. Unix timestamp. Fetch the data from this point in time. |
`to` | `int` | **Required**. Unix timestamp. Fetch the data to this point in time. |
Field | Type | Description |
---|---|---|
`time` | `string` | Time bucket unix timestamp |
`open` | `string` | Open price of time bucket |
`high` | `string` | Highest price in time bucket |
`low` | `string` | Lowest price in time bucket |
`close` | `string` | Close price of time bucket |
`volume` | `string` | Trading volume during time bucket |
Parameter | Type | Description |
---|---|---|
`api_key` | `string` | **Required**. Account API key. |
`offset` | `int` | **Required**. Number of rows to skip. |
`filter_pair` | `string` | *Optional*. Provide pair symbol to filter only this pair orders. |
`sort_pair` | `string` | *Optional*. Provide pair symbol to push orders of this pair to the top of the list. |
Field | Type | Description |
---|---|---|
`obid` | `int` | Unique order ID |
`pair` | `string` | Pair symbol |
`time` | `string` | Unix timestamp |
`side` | `string` | `BUY` or `SELL` |
`price` | `string` | Order price |
`amount` | `string` | Order amount |
`time_in_force` | `string` | `GTC`, `FOK` or `IOC` - order time in force setting |
`type` | `string` | Order type: `LIMIT`, `MARKET` or `STOP_LIMIT` |
`quote_prec` | `string` | Number of decimal places of quote asset |
`filled` | `string` | Filled order amount. **Optional: does not occur for a stop limit order that has not yet been triggered** |
`stop` | `string` | Stop price. **Optional: does not occur for orders other than stop limit** |
Parameter | Type | Description |
---|---|---|
`api_key` | `string` | **Required**. Account API key. |
`offset` | `int` | **Required**. Number of rows to skip. |
`filter_pair` | `string` | *Optional*. Provide pair symbol to filter only this pair orders. |
Field | Type | Description |
---|---|---|
`trades` | `array | Trades related to this order. |
`obid` | `int` | Unique order ID |
`pair` | `string` | Pair symbol |
`time` | `string` | Unix timestamp |
`side` | `string` | `BUY` or `SELL` |
`time_in_force` | `string` | `GTC`, `FOK` or `IOC` - order time in force setting |
`type` | `string` | Order type: `LIMIT`, `MARKET` or `STOP_LIMIT` |
`status` | `string` | Order status: `OPEN`, `FILLED`, `CANCELED` or `KILLED` |
`quote_prec` | `string` | Number of decimal places of quote asset |
`base` | `string` | Base asset symbol |
`quote` | `string` | Quote asset symbol |
`price` | `string` | Order price. **Optional: does not occur for market price orders** |
`amount` | `string` | Order amount. **Optional: does not occur for market orders, when the user has specified the total value he wants to receive instead of amount** |
`total` | `string` | Order total value. **Optional: only in market orders based on total value instead of amount** |
`filled` | `string` | Filled order amount. **Optional: does not occur for a stop limit order that has not yet been triggered** |
`stop` | `string` | Stop price. **Optional: does not occur for orders other than stop limit** |
Field | Type | Description |
---|---|---|
`time` | `string` | Unix timestamp |
`fee` | `string` | Maker/taker fee amount |
`price` | `string` | Trade price |
`amount` | `string` | Trade amount |
`total` | `string` | Trade total value |
`role` | `string` | `MAKER` or `TAKER` |
Parameter | Type | Description |
---|---|---|
`api_key` | `string` | **Required**. Account API key. |
`offset` | `int` | **Required**. Number of rows to skip. |
`filter_pair` | `string` | *Optional*. Provide pair symbol to filter only this pair orders. |
Field | Type | Description |
---|---|---|
`time` | `string` | Unix timestamp |
`pair` | `string` | Pair symbol |
`fee` | `string` | Maker/taker fee amount |
`price` | `string` | Trade price |
`amount` | `string` | Trade amount |
`total` | `string` | Trade total value |
`role` | `string` | `MAKER` or `TAKER` |
`side` | `string` | `BUY` or `SELL` |
Parameter | Type | Description |
---|---|---|
`api_key` | `string` | **Required**. Account API key. |
`pair` | `string` | **Required**. Pair symbol. |
`side` | `string` | **Required.** `BUY` or `SELL` |
`type` | `string` | **Required.** `MARKET`, `LIMIT` or `STOP_LIMIT` |
`time_in_force` | `string` | **Required.** `GTC`, `FOK` or `IOC` |
`price` | `string` | *Optional.* Order price. Not required for market price order. |
`amount` | `string` | *Optional.* Order amount. Not required for market price order if `total` was provided. |
`total` | `string` | *Optional.* Order total value. Not required for limit and stop limit orders, and for market order if `amount` was provided. |
`stop` | `string` | *Optional.* Order stop price. Not required for orders other than stop limit. |
`resp_type` | `string` | *Optional.* Response type. `NONE`, `ACK` or `RESULT`. Default `NONE` if not set |
Parameter | Type | Description |
---|---|---|
`api_key` | `string` | **Required**. Account API key. |
`obid` | `int` | **Required**. Unique order id. |
Parameter | Type | Description |
---|---|---|
`api_key` | `string` | **Required**. Account API key. |
Parameter | Type | Description |
---|---|---|
`streams` | `string`/`array | **Required**. Stream names. |
Parameter | Type | Description |
---|---|---|
`streams` | `string`/`array | **Required**. Stream names. |
Field | Type | Description |
---|---|---|
`time` | `int` | UNIX timestamp of trade |
`price` | `string` | Trade price |
`amount` | `string` | Trade amount in base asset. |
`total` | `string` | Trade total value in quote asset. |
`side` | `string` | Taker `BUY` or `SELL` |
`pair` | `string` | Trading pair symbol. |
Field | Type | Description |
---|---|---|
`time` | `int` | UNIX timestamp of candle start |
`pair` | `string` | Trading pair symbol. |
`open` | `string` | Candle open price. |
`high` | `string` | Candle highest price. |
`low` | `string` | Candle lowest price. |
`close` | `string` | Candle close price. |
`volume` | `string` | Candle volume in base asset. |
Field | Type | Description |
---|---|---|
`pair` | `string` | Trading pair symbol. |
`price` | `string` | New market price |
`change` | `int` | Percentage price change in last 24 hours |
`previous` | `string` | Previous market price. |
Field | Type | Description |
---|---|---|
`pair` | `string` | Trading pair symbol. |
`price` | `string` | New market price |
`change` | `int` | Percentage price change in last 24 hours |
`previous` | `string` | Previous market price. |
`high` | `string` | The highest price in last 24 hours. |
`low` | `string` | The lowest price in last 24 hours. |
`vol_base` | `string` | Last 24 hours volume in base asset. |
`vol_quote` | `string` | Last 24 hours volume in quote asset. |
Field | Type | Description |
---|---|---|
`pair` | `string` | Trading pair symbol. |
`amount` | `string` | New amount for given price level. A value of zero means that the price level no longer exists. |
`price` | `string` | Price level |
`side` | `string` | Orderbook side: `BUY` or `SELL` |
Field | Type | Description |
---|---|---|
`event` | `string` | Event type: `orderAccepted`, `orderRejected`, `orderUpdate`. |
`pair` | `string` | Trading pair symbol. |
`obid` | `int` | *Optional.* Order unique ID. |
`side` | `string` | *Optional.* Order side: `BUY` or `SELL` |
`type` | `string` | *Optional.* Order type: `MARKET`, `LIMIT`, `STOP_LIMIT` |
`time` | `int` | *Optional.* UNIX timestamp of event. |
`time_in_force` | `string` | *Optional.* `GTC`, `IOC` or `FOK` |
`base` | `string` | *Optional.* Base asset symbol. |
`quote` | `string` | *Optional.* Quote asset symbol. |
`price` | `string` | *Optional.* Order price. |
`amount` | `string` | *Optional.* Order amount. |
`total` | `string` | *Optional.* Order total value. |
`stop` | `string` | *Optional.* Order stop price. |
`status` | `string` | *Optional.* Order status: `OPEN`, `FILLED`, `KILLED`, `CANCELED`. |
`triggered` | `bool` | *Optional.* True means that stop limit order was just triggered . |
`filled` | `string` | *Optional.* Filled amount. |
`reason` | `string` | *Optional.* Reason of order rejection. |
Field | Type | Description |
---|---|---|
`time` | `int` | UNIX timestamp of the trade. |
`price` | `string` | Trade price. |
`amount` | `string` | Trade amount. |
`total` | `string` | Trade total value. |
`side` | `string` | Trade side: `BUY` or `SELL` |
`pair` | `string` | Trading pair symbol. |
`obid` | `int` | Order unique ID. |
`role` | `string` | `MAKER` or `TAKER` |
`fee` | `string` | Trade fee |