# SuperTx API
Field | Value |
---|---|
HTTP_SERVER_ENDPOINT | https://supertx.movapi.com |
# Get trading pair info
Get trading pair information
# Request
GET /v1/symbols
# Response
Param | Type | Description |
---|---|---|
price_decimal | Int | Price decimal |
amount_decimal | Int | Amount decimal |
base_asset | Object | Object of base asset |
├── asset_id | String | Asset ID |
├── symbol | String | The name of the asset |
├── effective_decimal | Int | Effective decimal |
└── min_exchange_num | Float | The minimum trading volume |
quote_asset | Object | Object of quote asset |
├── asset_id | String | Asset ID |
├── symbol | String | The name of the asset |
├── effective_decimal | Int | Effective decimal |
└── min_exchange_num | Float | The minimum trading volume |
Example:
# Request
GET https://supertx.movapi.com/v1/symbols
# Response
{
"code": 200,
"msg": "",
"data": [
{
"price_decimal": 4,
"amount_decimal": 4,
"base_asset": {
"asset_id": "328d60d8192425beeaea53dbbc7900778ec06f4ca2e4499f92aea6ca17645d4c",
"symbol": "USDC",
"effective_decimal":2,
"min_exchange_num":1
},
"quote_asset": {
"asset_id": "57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443f",
"symbol": "DAI",
"effective_decimal":2,
"min_exchange_num":1
}
}
]
}
# Get exchange rate
Get the exchange rate of a liquidity pool
# Request
GET /v1/exchange-rate
# Params
Param | Required | Type | Description |
---|---|---|---|
symbol | Yes | String | Trading pair,ex: DAI/USDT |
amount | No | String | Exchange amount, default 1 |
side | Yes | String | Exchange direction, buy or sell |
# Response
Param | Type | Description |
---|---|---|
amount | String | Transaction amount |
exchange_rate | String | Actual exchange rate |
oracle_exchange_rate | String | Oracle exchange rate |
Example:
# Request
GET https://supertx.movapi.com/v1/exchange-rate?symbol=USDC/DAI&amount=1&side=sell
# Response
{
"code": 200,
"msg": "",
"data": {
"amount": "1",
"exchange_rate": "0.981801",
"oracle_exchange_rate": "1"
}
}
# Build exchange
Create a redemption request, the parameter is the address of the asset changer, and return the transaction data to be signed.
# Request
POST /v1/build-exchange-request
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | Address |
# Body
Param | Required | Type | Description |
---|---|---|---|
symbol | Yes | String | Trading pair |
amount | No | String | Amount |
side | Yes | String | Trading direction |
exchange_rate | Yes | String | Exchange rate |
rate_deviation | Yes | String | Acceptable deviation |
# Response
Param | Type | Description |
---|---|---|
raw_transaction | string | Raw transaction |
signing_instructions | array | Signing instructions |
├── sign_data | array | Sign_data |
├── derivation_path | array | Derivation path |
└── pubkey | String | Public key |
Example:
POST https://supertx.movapi.com/v1/build-exchange-request?address=vp1q5hy06852u3h5js4efq7wwl0aut4fdemtk20pl4
# Request
{
"symbol":"USDC/DAI",
"amount":"1",
"side":"buy",
"exchange_rate":"1.017424"
}
# Response
{
"code": 200,
"msg": "",
"data": [
{
"raw_transaction": "07010001015f015d791d2f318247aadc14304860265f788f544f351dcc4bc07abf75dd5400b9920a57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443ff8d9cb2c0101160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b2201207ac8be38c84dfc52f3e68ad2b51fc580b9423371665337f8120aa54a15feba1702013d003b57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fc0843d011600146a386a295fee6837a6fa3a983493d3c09f48bee800013e003c57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fb8d58e2c01160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b00",
"signing_instructions": [
{
"derivation_path": [
"2c000000",
"99000000",
"01000000",
"00000000",
"01000000"
],
"sign_data": [
"004b1d4a27f94c90243ea1956c87e233407a300f462524f951a7f24bf484b3af"
],
"pubkey": "7ac8be38c84dfc52f3e68ad2b51fc580b9423371665337f8120aa54a15feba17"
}
]
]
}
# Submit exchange
# Request
POST /v1/submit-exchange-request
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | User address |
# Body
Param | Required | Type | Description |
---|---|---|---|
raw_transaction | Yes | String | Raw transaction |
signatures | Yes | array | Signature array |
# Response
Param | Type | Description |
---|---|---|
tx_hash | Object | Transaction hash |
symbol | String | Trading pair |
side | String | Buy or sell |
base_amount | String | Number of base assets |
quote_amount | String | Number of quote assets |
build_exchange_rate | String | Exchange rate at the time of building |
fee | String | Fee |
timestamp | String | Timestamp |
Example:
# Request
POST https://supertx.movapi.com/v1/submit-exchange-request?address=vp1q6x2u97j48hk8m0czfpc3lwtqgm7004npwxc7ff
{
"raw_transaction":"07010001015f015d791d2f318247aadc14304860265f788f544f351dcc4bc07abf75dd5400b9920a57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443ff8d9cb2c0101160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b2201207ac8be38c84dfc52f3e68ad2b51fc580b9423371665337f8120aa54a15feba1702013d003b57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fc0843d011600146a386a295fee6837a6fa3a983493d3c09f48bee800013e003c57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fb8d58e2c01160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b00",
"signatures":[
[
"4f5e0b94f983ab6d98c230e7edf031951c93809af318d0bb6c362714794c38c5939df58e43ac1a45599d777386724354c0ced7bab54d19bac02c233fa9e2050a"
]
]
}
# Response
{
"code": 200,
"msg": "",
"data": {
"tx_hash": "76aa591cbb0f5191410db2679222afd20a864de399349b311baa704f64245af6",
"symbol": "USDC/DAI",
"side": "sell",
"base_amount": "1.000000",
"quote_amount": "0.998990",
"build_exchange_rate": "0.9989900000",
"fee": "0.000499",
"timestamp": 1594779900
}
}
# Get exchange history
# Request
GET /v1/exchange-order-history
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | Address |
start | No | String | Query the start sequence number of the transaction, which defaults to 0 |
limit | No | String | Query the number of transactions, which defaults to 10 |
# Response
Param | Type | Description |
---|---|---|
symbol | String | Trading pair |
side | Bool | Buy or sell |
base_amount | Int | Number of base assets |
quote_amount | Int | Number of quote assets |
build_exchange_rate | String | Exchange rate at the time of building |
fee | String | Fee |
order_txs | Array | Order transaction information |
├── hash | String | Transaction hash |
├── timestamp | String | Transaction timestamp |
└── type | String | Transaction Type |
status | String | Trading status |
timestamp | String | Timestamp |
Example:
# Request
GET https://supertx.movapi.com/v1/exchange-order-history
# Response
{
"code": 200,
"msg": "",
"data": [
{
"symbol": "SUP/BTM",
"side": "sell",
"base_amount": "12",
"quote_amount": "133.26758009",
"build_exchange_rate": "11.1056316743",
"fee": "0.06666712",
"order_txs": [
{
"hash": "62e12e616c953729276d453df68e42203418beec19f1acb9d83fec7b7481fb08",
"timestamp": 1605741878,
"type": "in_tx_type"
},
{
"hash": "8867e0883dc601d7fcb1745461443ebd8fbee3305d3de198f1e0f1dc47c6a2dc",
"timestamp": 1605741883,
"type": "out_tx_type"
}
],
"status": "tx_pool_completed",
"timestamp": 1605741878
},
{
"symbol": "SUP/BTM",
"side": "buy",
"base_amount": "18.0087213",
"quote_amount": "200",
"build_exchange_rate": "0.0900436065",
"fee": "0.00900886",
"order_txs": [
{
"hash": "f89d1593c8f691f2b041bc35d6602863b487e35a91d080ffb91a0a36374d4365",
"timestamp": 1605741816,
"type": "in_tx_type"
},
{
"hash": "77d755a57601b6fc7779d24a6edb917a14965f3bfb86ae5e8e93316df5267733",
"timestamp": 1605741822,
"type": "out_tx_type"
}
],
"status": "tx_pool_completed",
"timestamp": 1605741816
}
]
}
# Get liquidity pool info
Get current information about the liquidity pool
# Request
GET v1/pool-info
# Response
Param | Type | Description |
---|---|---|
symbol | String | Trading pair |
base_amount | String | Number of base assets |
quote_amount | String | Number of quote assets |
Example:
# Request
GET https://supertx.movapi.com/v1/pool-info
# Response
{
"code": 200,
"msg": "",
"data": [
{
"symbol": "USDC/DAI",
"base_amount": "1602.942900",
"quote_amount": "402.354003"
}
]
}
# Get Asset proportion
# Request
GET /v1/asset-proportion
# Params
Param | Required | Type | Description |
---|---|---|---|
symbol | Yes | String | Trading pair |
# Response
Param | Type | Description |
---|---|---|
data | String | Asset proportion |
Example:
# Request
GET https://supertx.movapi.com/v1/asset-proportion?symbol=USDC/DAI
# Response
{
"code": 200,
"msg": "",
"data": "3.983912"
}
# Build multi asset deposit
Create dual asset transfer to liquidity pool request
# Request
POST /v1/build-multi-asset-deposit
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | Address |
# Body
名称 | Required | Type | Description |
---|---|---|---|
symbol | Yes | String | Trading pair |
quantity_proportion | Yes | String | Quantity proportion |
amount | Yes | String | Number of base assets |
# Response
Param | Type | Description |
---|---|---|
raw_transaction | string | Raw transaction |
signing_instructions | array | Signing instructions |
├── sign_data | array | Sign data |
├── derivation_path | array | Derivation path |
└── pubkey | String | Public key |
Example:
# Request
POST https://supertx.movapi.com/v1/build-multi-asset-deposit?address=vp1q6x2u97j48hk8m0czfpc3lwtqgm7004npwxc7ff
{
"symbol":"USDC/DAI",
"quantity_proportion":"1",
"amount":"100"
}
# Response
{
"code": 200,
"msg": "",
"data": [
{
"raw_transaction": "07010001015f015d791d2f318247aadc14304860265f788f544f351dcc4bc07abf75dd5400b9920a57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443ff8d9cb2c0101160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b2201207ac8be38c84dfc52f3e68ad2b51fc580b9423371665337f8120aa54a15feba1702013d003b57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fc0843d011600146a386a295fee6837a6fa3a983493d3c09f48bee800013e003c57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fb8d58e2c01160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b00",
"signing_instructions": [
{
"derivation_path": [
"2c000000",
"99000000",
"01000000",
"00000000",
"01000000"
],
"sign_data": [
"004b1d4a27f94c90243ea1956c87e233407a300f462524f951a7f24bf484b3af"
],
"pubkey": "7ac8be38c84dfc52f3e68ad2b51fc580b9423371665337f8120aa54a15feba17"
}
]
}
]
}
# Build single asset deposit
Create a single asset transfer request to the liquidity pool
# Request
POST /v1/build-single-asset-deposit
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | Address |
# Body
Param | Required | Type | Description |
---|---|---|---|
symbol | Yes | String | Trading pair |
amount | Yes | String | Number of assets |
currency | Yes | String | Symbol of the asset |
# Response
Param | Type | Description |
---|---|---|
raw_transaction | string | Raw transaction |
signing_instructions | array | Signing instructions |
├── sign_data | array | Sign data |
├── derivation_path | array | Derivation path |
└── pubkey | String | Public key |
Example:
# Request
POST https://supertx.movapi.com/v1/build-single-asset-deposit?address=tp1q6x2u97j48hk8m0czfpc3lwtqgm7004npwxc7ff
{
"symbol":"USDC/DAI",
"amount":"1",
"currency":"USDC"
}
# Response
{
"code": 200,
"msg": "",
"data": [
{
"raw_transaction": "07010001015f015d791d2f318247aadc14304860265f788f544f351dcc4bc07abf75dd5400b9920a57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443ff8d9cb2c0101160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b2201207ac8be38c84dfc52f3e68ad2b51fc580b9423371665337f8120aa54a15feba1702013d003b57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fc0843d011600146a386a295fee6837a6fa3a983493d3c09f48bee800013e003c57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fb8d58e2c01160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b00",
"signing_instructions": [
{
"derivation_path": [
"2c000000",
"99000000",
"01000000",
"00000000",
"01000000"
],
"sign_data": [
"004b1d4a27f94c90243ea1956c87e233407a300f462524f951a7f24bf484b3af"
],
"pubkey": "7ac8be38c84dfc52f3e68ad2b51fc580b9423371665337f8120aa54a15feba17"
}
]
}
]
}
# Submit deposit
Confirm the transfer of assets to the liquidity pool
# Request
POST /v1/submit-deposit
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | User Address |
# Body
Param | Required | Type | Description |
---|---|---|---|
raw_transaction | Yes | String | Raw transaction |
signatures | Yes | array | Signature array |
# Response
Param | Type | Description |
---|---|---|
tx_hash | string | Transaction hash |
symbol | String | Trading pair |
build_proportion | string | Exchange rate at the time of building |
base_amount | string | Number of base assets |
quote_amount | string | Number of quote assets |
Example:
# Request
POST https://supertx.movapi.com/v1/submit-deposit?address=vp1q6x2u97j48hk8m0czfpc3lwtqgm7004npwxc7ff
{
"raw_transaction":"07010001015f015d791d2f318247aadc14304860265f788f544f351dcc4bc07abf75dd5400b9920a57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443ff8d9cb2c0101160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b2201207ac8be38c84dfc52f3e68ad2b51fc580b9423371665337f8120aa54a15feba1702013d003b57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fc0843d011600146a386a295fee6837a6fa3a983493d3c09f48bee800013e003c57e5b3a3040e1c0162f64019838fd93b5f33dcde7069fa72aee48a054143443fb8d58e2c01160014a5c8fd1e8ae46f4942b9483ce77dfde2ea96e76b00",
"signatures":[
[
"4f5e0b94f983ab6d98c230e7edf031951c93809af318d0bb6c362714794c38c5939df58e43ac1a45599d777386724354c0ced7bab54d19bac02c233fa9e2050a"
]
]
}
# Response
{
"code": 200,
"msg": "",
"data": {
"tx_hash": "bcbf287361a3f763faf5cc4a6c4e0bdcb3c8677100c0e899b6a401f008782024",
"symbol": "USDC/DAI",
"build_proportion": "1",
"base_amount": "100",
"quote_amount": "100"
}
}
# Dual asset removal liquidity
# Request
POST /v1/submit-multi-asset-withdrawal
# Params
Param | Required | Type | Description |
---|---|---|---|
signature | Yes | String | The user's signature on the withdrawal request |
address | Yes | String | Address |
# Body
Param | Required | Type | Description |
---|---|---|---|
pubkey | Yes | String | Public key |
symbol | Yes | String | Trading pair |
quantity_proportion | Yes | String | Proportion of assets |
amount | Yes | String | Number of base assets |
timestamp | Yes | String | Timestamp |
# Response
Param | Type | Description |
---|---|---|
symbol | string | Trading pair |
quantity_proportion | String | Proportion of assets |
base_amount | string | Number of base assets |
quote_amount | string | Number of quote assets |
Example:
# Request
POST https://supertx.movapi.com/v1/submit-multi-asset-withdrawal?signature=ddabb7180da245d40ab3779a15b553ffc58c7ae8d34483a3128c908a7c715c64c05c38f4d369f46b8363ce5e3ee8519139fdc97b88ffff37c4f1cb5f6d66e80d&address=vp1q6x2u97j48hk8m0czfpc3lwtqgm7004npwxc7ff
{
"pubkey":"afdsafdasfdasfsadfas",
"symbol": "USDC/DAI",
"quantity_proportion": "1",
"amount":"100",
"time_stamp":"111111"
}
# Response
{
"code": 200,
"msg": "",
"data": {
"tx_hash": "bcbf287361a3f763faf5cc4a6c4e0bdcb3c8677100c0e899b6a401f008782024",
"symbol": "USDC/DAI",
"quantity_proportion": "1",
"base_amount": "100",
"quote_amount": "100",
}
}
# Single asset removal liquidity
# Request
POST /v1/submit-single-asset-withdrawal
# Params
Param | Required | Type | Description |
---|---|---|---|
signature | Yes | String | The user's signature on the withdrawal request |
address | Yes | String | Address |
# Body
Param | Required | Type | Description |
---|---|---|---|
pubkey | Yes | String | Public key |
symbol | Yes | String | Trading pair |
amount | Yes | String | Number of assets |
timestamp | Yes | String | Timestamp |
currency | Yes | String | Asset symbol |
# Response
Param | Type | Description |
---|---|---|
symbol | string | Trading pair |
currency | string | Asset symbol |
amount | String | Number of assets |
Example:
# Request
POST https://supertx.movapi.com/v1/submit-single-asset-withdrawal?signature=ddabb7180da245d40ab3779a15b553ffc58c7ae8d34483a3128c908a7c715c64c05c38f4d369f46b8363ce5e3ee8519139fdc97b88ffff37c4f1cb5f6d66e80d&address=vp1q6x2u97j48hk8m0czfpc3lwtqgm7004npwxc7ff
{
"pubkey":"afdsafdasfdasfsadfas",
"symbol": "USDC/DAI",
"amount":"100",
"timestamp":"111111",
"currency": "USDC"
}
# Response
{
"code": 200,
"msg": "",
"data": {
"symbol": "USDC/DAI",
"currency": "USDT",
"amount":"100",
}
}
# Get user earning
# Request
GET /v1/user-earning
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | Address |
# Response
名称 | Type | Description |
---|---|---|
symbol_info | object | Earning info for each pool |
├── symbol | String | Trading pair |
├── last_earning | String | Yesterday's income |
└── total_earning | String | Total earning |
total_earning | String | Total earning |
last_total_earning | String | Yesterday's total income |
Example:
# Request
GET https://supertx.movapi.com/v1/user-earning?address=vp1qc0736r3cpxz27uequxszn4l79sjnue8y96v7l5
# Response
{
"code": 200,
"msg": "",
"data": {
"symbol_info": [
{
"symbol": "USDC/DAI",
"last_earning": "3.000000",
"total_earning": "8.000000"
}
],
"total_earning": "8.000000",
"last_total_earning": "3.000000"
}
}
# Get annualized rate
# Request
GET /v1/annual-rate
# Response
Param | Type | Description |
---|---|---|
symbol | String | Trading pair |
annual-rate | String | Annual interest rate |
Example:
# Request
GET https://supertx.movapi.com/v1/annual-rate
# Response
{
"code": 200,
"msg": "",
"data": [
{
"symbol": "USDC/DAI",
"annual_rate": "0.12"
}
]
}
# Get multi-asset available info
Get information about the availability of multiple assets
# Request
GET /v1/multi-asset-available
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | Address |
# Response
Param | Type | Description |
---|---|---|
details | Array | Details of each trading pair |
├── base_available | String | Number of base assets |
├── quote_available | String | Number of quote assets |
└── symbol | String | Trading pair |
total_available_value | String | USD value of total assets |
Example:
# Request
GET https://supertx.movapi.com/v1/multi-asset-available?address=vp1qc0736r3cpxz27uequxszn4l79sjnue8y96v7l5
# Response
{
"code": 200,
"msg": "",
"data": {
"details": [
{
"base_available": "1",
"quote_available": "1",
"symbol": "USDC/DAI",
}
],
"total_available_value": "2.000000"
}
}
# Get single-asset available info
# Request
GET /v1/single-asset-available
# Params
Param | Required | Type | Description |
---|---|---|---|
address | Yes | String | Address |
# Response
Param | Type | Description |
---|---|---|
details | Array | Details of each trading pair |
├── base_available | String | Number of base assets |
├── quote_available | String | Number of quote assets |
└── symbol | String | Trading pair |
total_available_value | String | USD value of total assets |
Example:
# Request
GET https://supertx.movapi.com/v1/single-asset-available?address=vp1qc0736r3cpxz27uequxszn4l79sjnue8y96v7l5
# Response
{
"code": 200,
"msg": "",
"data": {
"details": [
{
"base_available": "1",
"quote_available": "1",
"symbol": "USDC/DAI",
}
],
"total_available_value": "2.000000"
}
}
# Get chain status info
# Request
GET v1/chain-status
# Response
Param | Type | Description |
---|---|---|
block_height | String | Synced block height |
Example:
# Request
GET https://supertx.movapi.com/v1/chain-status
# Response
{
"code": 200,
"msg": "",
"data": {
"block_height": 2915137
}
}