虚拟币

Support

Home > Support > UltraEx REST API

UltraEx REST API


start using 

REST, the abbreviation of Representational State Transfer, is currently the most popular Internet software architecture. It is well-structured, standards-compliant, easy to understand, and easy to expand, and is being adopted by more and more websites. The advantages are as follows:

· In a RESTful architecture, each URL represents a resource;

· A layer of presentation of such resources between the client and the server;

· The client operates on the server-side resources through four HTTP commands to implement “presentation level state conversion”.

Developers are advised to use the REST API for currency transactions or asset withdrawals.

Request interaction


The root URL of the REST access: https://ultraex.io/Home/Api/ requires scientific access when accessing All requests are based on the Https protocol. The contentType in the request header information needs to be uniformly set to: application/x-www-form-urlencoded

Request interaction description

1. Request parameters: Parameter encapsulation according to interface request parameters.

2. Submit request parameters: Submit the encapsulated request parameters to the server via POST or GET.

3. Server response: The server first performs parameter security verification on the user request data, and returns the response data to the user in JSON format according to the business logic after verification.

4. Data Processing: Process the server response data.

API reference


cryptocurrency Quotes API


Get UEX cryptocurrency market data

1. get_ticker Get UEX cryptocurrency quotes

URL https://ultraex.io/Home/Api/get_ticker

Example

# Request

GET https://ultraex.io/Home/Api/get_ticker

# Response

{

"date":"1410431279",

"ultraticker":{

"buy":"33.15",

"high":"34.15",

"last":"33.15",

"low":"32.05",

"sell":"33.16",

"vol":"10532696.39199642"

}

}

Return value description

Date: server time when returning data

Buy: buy one price

High: highest price

Last: Latest transaction price

Low: lowest price

Sell: sell one price

Vol: volume (last 24 hours)

Request parameter

symbol

String

yes

Transaction pair such as uex_eth

2. get_depth Get the depth of UEX cryptocurrency market

URL https://ultraex.io/Home/Api/get_depth

Example

# Request

GET https://ultraex.io/Home/Api/get_depth

# Response

{

"ultraasks": [

[792, 5],

[789.68, 0.018],

[788.99, 0.042],

[788.43, 0.036],

[787.27, 0.02]

],

"ultrabids": [

[787.1, 0.35],

[787, 12.071],

[786.5, 0.014],

[786.2, 0.38],

[786, 3.217],

[785.3, 5.322],

[785.04, 5.04]

]

}

Return value description

Asks : seller depth

Bid : buyer depth

Request parameter

symbol

String

yes

Transaction pair such as uex_eth

size

Integer

No (default 200)

value: 1-200

 

 

 

cryptocurrency Trading API


For UEX cryptocurrency transactions

1. get_userinfo gets user information

URL https://ultraex.io/Home/Api/get_userinfo access frequency 1 time / 2 seconds

Example

# Request

POST https://ultraex.io/Home/Api/get_userinfo

# Response

{

    "ultrainfo": {

        "funds": {

            "free": {

                "btc": "0",

                "ltc": "0",

                "eth": "0"

            },

            "freezed": {

                "btc": "0",

                "ltc": "0",

                "eth": "0"

            }

        }

    },

    "ultraresult": true

}

Return value description

Free: account balance

Freezed: account freeze balance

Request parameter

uid

String

yes

User ID

token

String

yes

Request token of the parameter

2. trade order transaction

URL https://ultraex.io/Home/Api/trade Access frequency 20 times/2 seconds

Example

# Request

POST https://ultraex.io/Home/Api/trade

# Response

{"status":1, "info": The operation was successful, "order_id": 123456}

Return value description

Status: 1 means successful return

Info: prompt information

Order_id: order ID

Request parameter

uid

String

yes

User ID

symbol

String

yes

Transaction pair such as uex_eth

type

String

yes

Trading type: limit price (buy/sell) market price list (buy_market/sell_market)

price

Double

no

Order price, market price, sell price

amount

Double

no

The number of transactions does not pass the market price, the market price to buy the price as the total amount of the purchase

token

String

yes

Request parameter signature

 

 

4. cancel_order cancel the order

URL https://ultraex.io/Home/Api/cancel_order Access frequency 20 times/2 seconds

Example

# Request

POST https://ultraex.io/Home/Api/cancel_order

# Response

#Multiple order return results (successful order ID, failed order ID)

{"success":"123456,123457","error":"123458,123459"}

Return value description

Result: true The request to cancel the order is successful, waiting for the system to execute the withdrawal; false to cancel the order (for a single order)

Order_id: order ID (for single order)

Success: the order ID of the successful request for withdrawal, waiting for the system to execute the withdrawal (for multiple orders)

Error: Order ID for which the withdrawal request failed (multiple orders for the user)

Request parameter

uid

String

yes

User ID

symbol

String

yes

Transaction pair such as uex_eth

order_id

String

yes

Order ID (multiple order IDs are separated by ",", allowing up to 3 orders to be revoked at a time)

token

String

yes

Request parameter signature

5. get_orderinfo Get the user's order information

URL https://ultraex.io/Home/Api/get_orderinfo Access frequency 20 times/2 seconds (unfilled)

Example

# Request

POST https://ultraex.io/Home/Api/get_orderinfo

# Response

{

    "result": true,

    "orders": [

        {

            "amount": 0.1,

            "create_date": 1418008467000,

            "deal_amount": 0,

            "order_id": 10000591,

            "price": 500,

            "status": 0,

            "symbol": "btc_usd",

            "type": "sell"

        },

        {

            "amount": 0.2,

            "create_date": 1417417957000,

            "deal_amount": 0,

            "order_id": 10000724,

            "price": 0.1,

            "status": 0,

            "symbol": "btc_usd",

            "type": "buy"

        }

    ]

}

Return value description

Amount: the number of orders

Create_date: delegate time

Deal_amount: number of transactions

Order_id: order ID

Price: commission price

Status:-1: revoked 0: not filled 1: part of the deal 2: complete transaction

Type:buy: market price buy / sell: market price to sell

Request parameter

uid

String

yes

User ID

symbol

String

yes

Transaction pair such as uex_eth

order_id

Long

yes

Order ID -1: The order has not been completed, otherwise the order corresponding to the order number is queried.

token

String

yes

Request parameter signature

 

 

7. get_order_history gets historical order information, only returns information for the last two days

URL https://ultraex.io/Home/Api/get_order_history

Example

# Request

POST https://ultraex.io/Home/Api/get_order_history

# Response

{

"current_page": 1,

"orders": [

{

"amount": 0,

"create_date": 1405562100000,

"deal_amount": 0,

"order_id": 0,

"price": 0,

"status": 2,

"symbol": "btc_usd",

"type": "sell”

}

],

"page_length": 1,

"result": true,

"total": 3

}

Return value description

Current_page: current page number

Orders: delegate details

Amount: the number of orders

Create_date: delegate time

Deal_amount: number of transactions

Order_id: order ID

Price: commission price

Status:-1: revoked 0: not filled 1: part of the deal 2: complete transaction

Type:buy: market price buy / sell: market price to sell

Page_length: number of data per page

Result: true means successful return

Request parameter

uid

String

yes

User ID

symbol

String

yes

Transaction pair such as uex_eth

status

Integer

yes

Query status 0: Unfinished order 1: Completed order (data for the last two days)

current_page

Integer

yes

current page number

page_length

Integer

yes

The number of data per page, up to 200

token

String

yes

Request parameter signature

 

 

Note: Signature requirements

Please post url: https://ultraex.io/Home/Api/get_Sign

The token is successfully returned, the token is valid for one day, and the request is expired.

Request parameter

uid

String

yes

User ID

password

String

yes

User login password

mobilephone

String

yes

User-bound mobile number