# SuperTx API

Field Value
HTTP_SERVER_ENDPOINT https://ex.movapi.com/superconducting

# Get all trading pairs in the market

Returns all trading pairs information for the MOV SuperTx exchange

# Request

GET /v1/symbols

# Response

Field Type Description
price_decimal String Price decimal of trading pairs
amount_decimal String amount decimal of trading pairs
base_asset Object The object of the base asset
asset_id String The id of the asset
symbol String The name of the asset
quote_asset Object The object of the quote asset
asset_id String The id of the asset
symbol String The name of the asset

Example:

# Request
GET https://ex.movapi.com/superconducting/v1/symbols

# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "price_decimal":4,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"c4644dd6643475d57ed624f63129ab815f282b61f4bb07646d73423a6e1a1563",
            "symbol":"USDC"
         },
         "quote_asset":{
            "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
            "symbol":"USDT"
         }
      },
      {
         "price_decimal":4,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"25f2069140fa3ff4d6e0dc1d0fcaa11ace01eb721f115f0f1a5a3782db597fb1",
            "symbol":"DAI"
         },
         "quote_asset":{
            "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
            "symbol":"USDT"
         }
      },
      {
         "price_decimal":4,
         "amount_decimal":4,
         "base_asset":{
            "asset_id":"25f2069140fa3ff4d6e0dc1d0fcaa11ace01eb721f115f0f1a5a3782db597fb1",
            "symbol":"DAI"
         },
         "quote_asset":{
            "asset_id":"c4644dd6643475d57ed624f63129ab815f282b61f4bb07646d73423a6e1a1563",
            "symbol":"USDC"
         }
      }
   ]
}

# Gets the exchange price for the trading pair

Gets the exchange price for the transaction pair

# Request

GET /v1/exchange-rate

# Params

Parameter Required Type detail
symbol yes String trading pair,ex: DAI/USDT
amount no String Amount exchanged,default 1
side yes String buy or sell

# Response

Field Type Description
amount String Transaction amount
exchange_rate String Actual exchange rate
base_exchange_rate String Reference exchange rate
oracle_exchange_rate String oracle exchange rate

Example:

# Request
GET https://ex.movapi.com/superconducting/v1/exchange-rate?symbol=DAI/USDT&amount=100&side=buy

# Response
{
   "code":200,
   "msg":"",
   "data":{
      "amount":"500",
      "exchange_rate":"0.998817",
      "base_exchange_rate":"0.999323",
      "oracle_exchange_rate":"1"
   }
}

# Gets the total amount of assets in the trading pool

Get how many assets each trading pair has in the SuperTx LP pool

# Request

GET /v1/pool-info

# Response

Field Type Description
symbol String trading pair,ex: DAI/USDT
base_amount String The total amount of base assets
quote_amount String The total amount of quote assets
total_amount String The total amount of assets

Example:

# Request
GET https://ex.movapi.com/superconducting/v1/pool-info

# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "symbol":"USDC/USDT",
         "base_amount":"510487.766162",
         "quote_amount":"563948.740743",
         "total_amount":"1074436.506905"
      },
      {
         "symbol":"DAI/USDT",
         "base_amount":"174766.143552",
         "quote_amount":"808404.879614",
         "total_amount":"983171.023166"
      },
      {
         "symbol":"DAI/USDC",
         "base_amount":"91427.196482",
         "quote_amount":"445954.744501",
         "total_amount":"537381.940983"
      }
   ]
}

# Build SuperTx exchange order

Build SuperTx exchange order

# Request

POST /v1/build-exchange

# Params

Parameter Required Type Description
address yes String The account address

# Body

Field Required Type Description
pubkey yes String The public key
symbol yes String trading pair
side yes String buy or sell
amount yes String Total amount quoted
exchange_rate yes String exchange rate

# Response

Field Type Description
tx Object The object of the transaction
hash String Transaction hash
status_fail Bool Whether the transaction is an invalid transaction with an exhausted fee
size Int Transaction size
submission_timestamp Int The timestamp of the transaction submission
memo String Memo message
inputs Array UTXO input
script String Script address
address String address
asset Object The object of the asset
asset_id String asset ID
symbol String The name of asset
amount Int The amount of assets
type String UTXO type
outputs Array UTXO output
script String Script address
address String address
asset String asset ID
amount Int The amount of assets
type String UTXO type
fee Int Transaction Fee
balances Array Change of asset amount
asset Object The object of the asset
amount Int The amount of assets
types Array Transaction type
raw_transaction String Transaction information to be signed
signing_instructions Array The information required to sign the transaction
derivation_path Array The derived path
sign_data Array The signature data
pubkey String The public key

Example:

# Request
POST https://ex.movapi.com/superconducting/v1/build-exchange?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3

{
   "pubkey":"b66e20a477fefef087cb1fc70c7cea09c53cb072b8b22bf80b5f15890a8a0daf",
   "symbol":"DAI/USDT",
   "side":"buy",
   "amount":"0.1",
   "exchange_rate":"0.977421"
}

# Response
{
   "code":200,
   "msg":"",
   "data":[
      {
         "tx":{
            "hash":"2ee2299dfdff9e26a5a0eb12733202ad959a86f76fa65693a850a6229a00cb2c",
            "status":True,
            "size":263,
            "submission_timestamp":0,
            "memo":"",
            "inputs":[
               {
                  "script":"0014fe0b2ba5ef7176083702e2b67cdf37b862e4375f",
                  "address":"vp1qlc9jhf00w9mqsdczu2m8ehehhp3wgd6lfvyluc",
                  "asset":{
                     "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                     "symbol":"USDT"
                  },
                  "amount":"0.112687",
                  "type":"spend"
               }
            ],
            "outputs":[
               {
                  "utxo_id":"77122548d46a644e7e941587bde15d12c5bfa5e51467ee79c09cf8cf01d9d503",
                  "script":"0014e45c93204670591cf4568bb53024225987d2bd9c",
                  "address":"vp1qu3wfxgzxwpv3eazk3w6nqfpztxra90vuvh3v56",
                  "asset":{
                     "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                     "symbol":"USDT"
                  },
                  "amount":"0.1",
                  "type":"control"
               },
               {
                  "utxo_id":"77762e1a08d5359677306f1c169772eb115115e039afa1f12ae0ab4fb61d4395",
                  "script":"0014fe0b2ba5ef7176083702e2b67cdf37b862e4375f",
                  "address":"vp1qlc9jhf00w9mqsdczu2m8ehehhp3wgd6lfvyluc",
                  "asset":{
                     "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                     "symbol":"USDT"
                  },
                  "amount":"0.012687",
                  "type":"control"
               }
            ],
            "fee":"0",
            "balances":[
               {
                  "asset":{
                     "asset_id":"184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46",
                     "symbol":"USDT"
                  },
                  "amount":"-0.1"
               }
            ],
            "types":[
               "ordinary"
            ]
         },
         "raw_transaction":"07010001015e015c0bb26ace224218e8e782adcbd90e72f787c1a84d31cfc3014fa06bc87361eed6184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46aff0060201160014fe0b2ba5ef7176083702e2b67cdf37b862e4375f220120b66e20a477fefef087cb1fc70c7cea09c53cb072b8b22bf80b5f15890a8a0daf02013d003b184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46a08d0601160014e45c93204670591cf4568bb53024225987d2bd9c00013c003a184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd468f6301160014fe0b2ba5ef7176083702e2b67cdf37b862e4375f00",
         "signing_instructions":[
            {
               "derivation_path":[
                  "2c000000",
                  "99000000",
                  "01000000",
                  "00000000",
                  "01000000"
               ],
               "sign_data":[
                  "73e3000f7f6eb98ad2fcce58ad0479f22845aca9d74c3b42b54787fa1819496f"
               ],
               "pubkey":"b66e20a477fefef087cb1fc70c7cea09c53cb072b8b22bf80b5f15890a8a0daf"
            }
         ]
      }
   ]
}

# Submit SuperTx exchange request

Submit SuperTx exchange request

# Request

GET /v1/submit-exchange

# Params

Parameter Required Type Description
address yes String account address

# Body

Field Required Type Description
raw_transaction yes String The data returned by the previous build-Exchange interface
signatures yes Array signature data

# Response

Field Type Description
tx_hash String Transaction hash
order Object The object of order
symbol String Trading pair ex: DAI/USDT
side String buy or sell
base_amount String The total amount of base assets
quote_amount String The total amount of quote assets
build_exchange_rate String Exchange rates
tx_hash String Transaction hash
fee String Transaction rate
timestamp Int64 timestamp

Example:

# Request
GET https://ex.movapi.com/superconducting/v1/submit-exchange?address=vp1qzpm9pqf3phngkv9qnv73tgtr2mzdnxpdswphm3

{
   "raw_transaction":"07010001015e015ce590d63398cccf34b9005689c2b608c7609baf7fe06a57b1370abb7aa983a992184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46f8f0060001160014fe0b2ba5ef7176083702e2b67cdf37b862e4375f220120b66e20a477fefef087cb1fc70c7cea09c53cb072b8b22bf80b5f15890a8a0daf02013d003b184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46a08d0601160014e45c93204670591cf4568bb53024225987d2bd9c00013c003a184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46d86301160014fe0b2ba5ef7176083702e2b67cdf37b862e4375f00",
   "signatures":[
      [
         "3f9c28bd3b883fae75ec60fb3b381767d5671a73ffa0e1cc44debfca828395574816d0da27879be2990ef5abf742ac1f905f3dd0a643f745ac253f5189101c01"
      ]
   ]
}

# Response

{
   "code":200,
   "msg":"",
   "data":{
      "tx_hash":"2ee2299dfdff9e26a5a0eb12733202ad959a86f76fa65693a850a6229a00cb2c",
      "order":{
         "order_id":227695,
         "symbol":"DAI/USDT",
         "side":"buy",
         "base_amount":"0.097672",
         "quote_amount":"0.100000",
         "build_exchange_rate":"0.9767210000",
         "tx_hash":"2ee2299dfdff9e26a5a0eb12733202ad959a86f76fa65693a850a6229a00cb2c",
         "fee":"0.000048",
         "type":"superconducting_swap",
         "timestamp":1595498532
      }
   }
}
Last Updated: 10/23/2020, 3:30:56 PM