RunesDEX
  • 🌞What is Runes Dex
  • Runes Dex Intro
    • 🚙Get Started
      • Create Wallet
      • Get BTC
      • What Is a Bitcoin Taproot Address
      • What is UTXO
      • What is Bitcoin Runes
  • Products
    • 🔄Exchange
      • What Is an Automated Market Maker
      • Liquidity Pools
      • Swap
      • Fees
      • How to Trade
    • 🔎Explore
      • Tokens
      • Pools
      • Transactions
  • Tokenomics
    • 🪙RUNES•NETWORK
  • Support
    • ❓FAQ
    • 🖼️Brand Kit
    • 🤝Contacts
  • API DOCS
    • Introduction
    • Swap
    • API Specification
  • Links
    • Website
    • Twitter
    • Discord
    • Mirror
Powered by GitBook
On this page
  1. API DOCS

API Specification

PreviousSwap

Our API is defined using the OpenAPI 3.0 specification. You can easily explore and test the endpoints using tools like Swagger UI, or Postman. For convenience, you can interact with our API on our hosted SwaggerUI page:

You can also quickly send sample API requests using the below. If you'd prefer to use a tool like Postman, download our OpenAPI spec available at:

API Explorer

https://app.runesdex.com/v1/swagger
https://app.runesdex.com/v1/swagger/swagger.yaml
API Explorer

Healthcheck endpoint

get


This endpoint is used to check if the service is up and running.\

Responses
200
Ok Status
get
GET /v1/healthcheck HTTP/1.1
Host: 
Accept: */*
200

Ok Status

No content

Version endpoint

get


This endpoint is used to get the version of the service.\

Responses
200
App Info
application/json
get
GET /v1/version HTTP/1.1
Host: 
Accept: */*
200

App Info

{
  "app": "runes_dex",
  "build": "main",
  "commit": "03798661f49a25592975d96bf9a80b9b0555ae5a",
  "version": "0.4.5"
}

List known runes

get


This endpoint is used to list known runes.

Query parameters
namestring | nullableOptional

Filter by rune name as %NAME%. "SUPER" will match "MYSUPERRUNE", for example.

Example: SUPER
exists_in_pool_with_liquidityboolean | nullableOptional

Specify true for pairs with liquidity, false for pairs without, or omit for all pairs.

featuredboolean | nullableOptional

Will return only featured runes.

limitinteger · int32 | nullableOptional

Number of runes to return.

Default: 50
pageinteger · int32 | nullableOptional

Page number for pagination.

orderstring · enum | nullableOptional

Order of the results.

Example: ASCPossible values:
Responses
200
List of matched runes
application/json
400
Bad Request
application/json
500
Internal server error
application/json
get
GET /v1/runes HTTP/1.1
Host: 
Accept: */*
{
  "meta": {
    "page": 0,
    "limit": 50,
    "offset": 0,
    "has_more": true,
    "total_records": 123
  },
  "records": [
    {
      "id": "3009048:5",
      "rune": "MAXDECIMALSRUNESOBIG",
      "display_name": "MAXDECIMALSRUNESOBIG",
      "symbol": "¤",
      "block": 3009048,
      "tx_id": 5,
      "mints": 0,
      "max_supply": "1000000000",
      "minted": "1000000000",
      "in_circulation": "1000000000",
      "divisibility": 8,
      "turbo": true,
      "timestamp": 1727898475,
      "etching_tx": "81972d23a9abaa1c6f0d96b7bccd9af905ff8a4f44ac50f2a62366f92e5a8efb",
      "commitment_tx": "3caae66d4c38c46f56f12571fc518bbb36ce3ec03a4e3b6c3ed44dbee9fa9630",
      "raw_data": "7b22656469637473223a5b5d2c2265746368696e67223a7b2264697669736962696c697479223a33382c227072656d696e65223a313030303030303030302c2272756e65223a224d4158444543494d414c5352554e45534f424947222c2273706163657273223a302c2273796d626f6c223a6e756c6c2c227465726d73223a6e756c6c2c22747572626f223a747275657d2c226d696e74223a6e756c6c2c22706f696e746572223a317d",
      "is_featured": false
    }
  ]
}

Status endpoint

get


Returns the last indexed block to assert the status of the service.\

Responses
200
Sync status is returned
application/json
get
GET /v1/status HTTP/1.1
Host: 
Accept: */*
200

Sync status is returned

[
  {
    "height": 10,
    "indexer": "runes_index"
  }
]

Search Runes by name

get


This endpoint is used to search for Runes.\

Query parameters
sstringRequiredExample: BIG
Responses
200
Success
application/json
400
Bad Request
application/json
500
Internal server error
application/json
get
GET /v1/runes/search?s=BIG HTTP/1.1
Host: 
Accept: */*
{
  "records": [
    {
      "id": "3009048:5",
      "rune": "MAXDECIMALSRUNESOBIG",
      "display_name": "MAXDECIMALSRUNESOBIG",
      "symbol": "¤",
      "block": 3009048,
      "tx_id": 5,
      "mints": 0,
      "max_supply": "1000000000",
      "minted": "1000000000",
      "in_circulation": "1000000000",
      "divisibility": 8,
      "turbo": true,
      "timestamp": 1727898475,
      "etching_tx": "81972d23a9abaa1c6f0d96b7bccd9af905ff8a4f44ac50f2a62366f92e5a8efb",
      "commitment_tx": "3caae66d4c38c46f56f12571fc518bbb36ce3ec03a4e3b6c3ed44dbee9fa9630",
      "raw_data": "7b22656469637473223a5b5d2c2265746368696e67223a7b2264697669736962696c697479223a33382c227072656d696e65223a313030303030303030302c2272756e65223a224d4158444543494d414c5352554e45534f424947222c2273706163657273223a302c2273796d626f6c223a6e756c6c2c227465726d73223a6e756c6c2c22747572626f223a747275657d2c226d696e74223a6e756c6c2c22706f696e746572223a317d",
      "is_featured": false
    }
  ]
}

Get Rune by name

get


This endpoint is used to get a Rune by name.\

Path parameters
runestringRequired
Responses
200
Success
application/json
400
Bad Request
application/json
500
Internal server error
application/json
get
GET /v1/runes/{rune} HTTP/1.1
Host: 
Accept: */*
{
  "id": "3009048:5",
  "rune": "MAXDECIMALSRUNESOBIG",
  "display_name": "MAXDECIMALSRUNESOBIG",
  "symbol": "¤",
  "block": 3009048,
  "tx_id": 5,
  "mints": 0,
  "max_supply": "1000000000",
  "minted": "1000000000",
  "in_circulation": "1000000000",
  "divisibility": 8,
  "turbo": true,
  "timestamp": 1727898475,
  "etching_tx": "81972d23a9abaa1c6f0d96b7bccd9af905ff8a4f44ac50f2a62366f92e5a8efb",
  "commitment_tx": "3caae66d4c38c46f56f12571fc518bbb36ce3ec03a4e3b6c3ed44dbee9fa9630",
  "raw_data": "7b22656469637473223a5b5d2c2265746368696e67223a7b2264697669736962696c697479223a33382c227072656d696e65223a313030303030303030302c2272756e65223a224d4158444543494d414c5352554e45534f424947222c2273706163657273223a302c2273796d626f6c223a6e756c6c2c227465726d73223a6e756c6c2c22747572626f223a747275657d2c226d696e74223a6e756c6c2c22706f696e746572223a317d",
  "is_featured": false
}

Get Rune balance

get


This endpoint is used to get a Rune balance by address.\

Path parameters
addressstringRequired
runestringRequired

BTC or rune name

Responses
200
Success
application/json
400
Bad Request
application/json
500
Internal server error
application/json
get
GET /v1/runes/by-address/{address}/balance/{rune} HTTP/1.1
Host: 
Accept: */*
{
  "asset": {
    "name": "BTC",
    "display_name": "Bitcoin",
    "symbol": "B",
    "decimals": 8,
    "max_supply": "21000000000",
    "in_circulation": "21000000000"
  },
  "address": "bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f",
  "balance": "1000000000"
}

List all balances of specific address

get


This endpoint is used to list balances of Runes by address.\

Path parameters
addressstringRequired
Responses
200
Success
application/json
500
Internal server error
application/json
get
GET /v1/runes/by-address/{address}/balance HTTP/1.1
Host: 
Accept: */*
{
  "meta": {
    "page": 0,
    "limit": 50,
    "offset": 0,
    "has_more": true,
    "total_records": 123
  },
  "records": [
    {
      "asset": {
        "name": "BTC",
        "display_name": "Bitcoin",
        "symbol": "B",
        "decimals": 8,
        "max_supply": "21000000000",
        "in_circulation": "21000000000"
      },
      "address": "bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f",
      "balance": "1000000000"
    }
  ]
}

List UTXOs by asset and address

get


This endpoint is used to list UTXOs by asset and address.\

Path parameters
assetstringRequired
addressstringRequired
Query parameters
limitinteger · int32 | nullableOptional

Number of runes to return.

Default: 50
namestring | nullableOptional

Filter by rune name as %NAME%. "SUPER" will match "MYSUPERRUNE", for example.

Example: SUPER
orderstring · enum | nullableOptional

Order of the results.

Example: ASCPossible values:
pageinteger · int32 | nullableOptional

Page number for pagination.

Responses
200
Success
application/json
500
Internal server error
application/json
get
GET /v1/utxo/{asset}/{address} HTTP/1.1
Host: 
Accept: */*
{
  "meta": {
    "page": 0,
    "limit": 50,
    "offset": 0,
    "has_more": true,
    "total_records": 123
  },
  "records": [
    {
      "id": 123,
      "block": 3009048,
      "tx_id": 1,
      "tx_hash": "af7ef135a4469ec63af59e7244693418fdb96e852baf84c0adb70b28d9ec99e1",
      "output_n": 0,
      "rune": "MAXDECIMALSRUNESOBIG",
      "address": "bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f",
      "pk_script": "76a914c0e3d9d0c2f0a5e2a0d6a9e1f3c5f6e8c8d7d88ac",
      "amount": "1000000000",
      "btc_amount": 600,
      "spend": false
    }
  ]
}

Get BTC balance by address

get


This endpoint is used to get a BTC balance by address.\

Path parameters
addressstringRequiredExample: tb1ps07g3t8hctex0ula3jaxxa85dqw28ewl0krmnt8mlpxukmzp9zeqmzjfdw
Responses
200
Success
application/json
500
Internal server error
application/json
get
GET /v1/btc/balance/{address} HTTP/1.1
Host: 
Accept: */*
{
  "address": "tb1ps07g3t8hctex0ula3jaxxa85dqw28ewl0krmnt8mlpxukmzp9zeqmzjfdw",
  "balance": 1
}

Get list of Trading Pairs

get


This endpoint is used to get a list of trading pairs.\

Query parameters
limitinteger · int32 | nullableOptional

Number of runes to return.

Default: 50
namestring | nullableOptional

Filter by rune name as %NAME%. "SUPER" will match "MYSUPERRUNE", for example.

Example: SUPER
orderstring · enum | nullableOptional

Order of the results.

Example: ASCPossible values:
pageinteger · int32 | nullableOptional

Page number for pagination.

Responses
200
Success
application/json
500
Internal server error
application/json
get
GET /v1/pairs HTTP/1.1
Host: 
Accept: */*
{
  "meta": {
    "page": 0,
    "limit": 50,
    "offset": 0,
    "has_more": true,
    "total_records": 123
  },
  "records": [
    {
      "base_asset": {
        "name": "BTC",
        "display_name": "Bitcoin",
        "symbol": "B",
        "decimals": 8,
        "max_supply": "21000000000",
        "in_circulation": "21000000000"
      },
      "quote_asset": {
        "name": "THISISZERODECIMALRUNE",
        "display_name": "THISISZERODECIMALRUNE",
        "symbol": "¤",
        "decimals": 0,
        "max_supply": "1000000000",
        "in_circulation": "1000000000"
      },
      "base_amount": "1279361",
      "quote_amount": "35200000",
      "rate": "3634548.2954545454545454545",
      "id": 2,
      "pool_address": "tb1pptp2yfl3xjvltfxwwvqnsspe60uyc0a24d90ymas4qxl8xs8rxss94quj9",
      "price_btc": "2.751373537258053043668E-7",
      "price_sat": "7.51373537258053043668",
      "price_usd": "0.0170889585035029197178120051",
      "btcisd_price": "62110.64",
      "market_cap": "17088958.50",
      "fdv": "17088958.50",
      "tvl": "43725.89",
      "done_swap_count": 3,
      "base_1d_volume": "1279361",
      "quote_1d_volume": "35200000"
    }
  ]
}

Get Trading Pair

get


This endpoint is used to get a trading pair.

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
Responses
200
Success
application/json
400
Bad Request
application/json
404
404 is returned if pair is not found
application/json
500
Internal server error
application/json
get
GET /v1/pairs/{base}-{quote} HTTP/1.1
Host: 
Accept: */*
{
  "base_asset": {
    "name": "BTC",
    "display_name": "Bitcoin",
    "symbol": "B",
    "decimals": 8,
    "max_supply": "21000000000",
    "in_circulation": "21000000000"
  },
  "quote_asset": {
    "name": "THISISZERODECIMALRUNE",
    "display_name": "THISISZERODECIMALRUNE",
    "symbol": "¤",
    "decimals": 0,
    "max_supply": "1000000000",
    "in_circulation": "1000000000"
  },
  "base_amount": "1279361",
  "quote_amount": "35200000",
  "rate": "3634548.2954545454545454545",
  "id": 2,
  "pool_address": "tb1pptp2yfl3xjvltfxwwvqnsspe60uyc0a24d90ymas4qxl8xs8rxss94quj9",
  "price_btc": "2.751373537258053043668E-7",
  "price_sat": "7.51373537258053043668",
  "price_usd": "0.0170889585035029197178120051",
  "btcisd_price": "62110.64",
  "market_cap": "17088958.50",
  "fdv": "17088958.50",
  "tvl": "43725.89",
  "done_swap_count": 3,
  "base_1d_volume": "1279361",
  "quote_1d_volume": "35200000"
}

Get Address Position

get


This endpoint is used to get the position of an address in a trading pair.\

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
addressstringRequiredExample: tb1ps07g3t8hctex0ula3jaxxa85dqw28ewl0krmnt8mlpxukmzp9zeqmzjfdw
Responses
200
Success
application/json
500
Internal server error
application/json
get
GET /v1/pairs/{base}-{quote}/address-position/{address} HTTP/1.1
Host: 
Accept: */*
{
  "trading_pair": 2,
  "base_asset": {
    "name": "BTC",
    "display_name": "Bitcoin",
    "symbol": "B",
    "decimals": 8,
    "max_supply": "21000000000",
    "in_circulation": "21000000000"
  },
  "pool_share": "0.153",
  "user_locked_value_usd": "1223123.23",
  "earnings": "333.33",
  "base_value_usd": "1223123.23",
  "quote_value_usd": "1223123.23"
}

Calculate

get


This endpoint is used to calculate the base and quote amounts.\

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
Query parameters
basestringOptionalExample: BTC
quotestringOptionalExample: MYLOVELYRUNE
Responses
200
Success
application/json
400
Bad Request
application/json
404
returned when pair is not found
application/json
500
Internal server error
application/json
get
GET /v1/pairs/{base}-{quote}/calculate HTTP/1.1
Host: 
Accept: */*
{
  "base": "1000",
  "quote": "10000"
}

Get Trading Pair Price History

get


This endpoint is used to get the price history of a trading pair.\

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
Query parameters
start_timestring · partial-date-time | nullableOptional
end_timestring · partial-date-time | nullableOptional
limitinteger · int32 · min: 1 · max: 1000Optional
Responses
200
Gapfilled candlestick data
application/json
400
Bad Request
application/json
404
404 is returned if pair is not found
application/json
500
Internal server error
application/json
get
GET /v1/pairs/{base}-{quote}/price-history HTTP/1.1
Host: 
Accept: */*
[
  [
    "2023-07-09T07:46:40",
    0,
    "100",
    "101",
    "102",
    "103",
    "1000",
    "102000",
    5
  ]
]

Get Trading Pair Swap History

get


This endpoint is used to get the swap history of a trading pair.\

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
Query parameters
orderstring · enum | nullableOptional

Order of the results.

Example: ASCPossible values:
limitinteger · int32 | nullableOptional

Number of runes to return.

Default: 50
pageinteger · int32 | nullableOptional

Page number for pagination.

Responses
200
Success
application/json
400
Bad Request
application/json
404
returned when pair is not found
application/json
500
Internal server error
application/json
get
GET /v1/pairs/{base}-{quote}/swap-history HTTP/1.1
Host: 
Accept: */*
{
  "meta": {
    "page": 0,
    "limit": 50,
    "offset": 0,
    "has_more": true,
    "total_records": 123
  },
  "records": [
    {
      "time": "2025-05-15T03:15:58.246Z",
      "trading_pair_id": 1,
      "side": "buy",
      "base_amount": "1000",
      "quote_amount": "10000",
      "price_btc": "0.001",
      "btcusd_price": "1000"
    }
  ]
}

Get User Liquidity

get


This endpoint is used to get a user's liquidity positions.\

Path parameters
addressstringRequiredExample: tb1ps07g3t8hctex0ula3jaxxa85dqw28ewl0krmnt8mlpxukmzp9zeqmzjfdw
Responses
200
Success
application/json
500
Internal server error
application/json
get
GET /v1/users/{address}/liquidity HTTP/1.1
Host: 
Accept: */*
[
  {
    "trading_pair": 2,
    "base_asset": {
      "name": "BTC",
      "display_name": "Bitcoin",
      "symbol": "B",
      "decimals": 8,
      "max_supply": "21000000000",
      "in_circulation": "21000000000"
    },
    "pool_share": "0.153",
    "user_locked_value_usd": "1223123.23",
    "earnings": "333.33",
    "base_value_usd": "1223123.23",
    "quote_value_usd": "1223123.23"
  }
]

Get user

get


This endpoint is used to get a user from the database.\

Path parameters
addressstringRequiredExample: tb1ps07g3t8hctex0ula3jaxxa85dqw28ewl0krmnt8mlpxukmzp9zeqmzjfdw
Responses
200
List of addresses
application/json
Responsestring[]Example: bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f
500
Internal server error
application/json
get
GET /v1/users/{address} HTTP/1.1
Host: 
Accept: */*
[
  "bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f"
]
  • API Explorer
  • GETHealthcheck endpoint
  • GETVersion endpoint
  • GETList known runes
  • GETStatus endpoint
  • GETSearch Runes by name
  • GETGet Rune by name
  • GETGet Rune balance
  • GETList all balances of specific address
  • GETList UTXOs by asset and address
  • GETGet BTC balance by address
  • GETGet list of Trading Pairs
  • POSTCreate Trading Pair
  • GETGet Trading Pair
  • GETGet Address Position
  • POSTAdd Liquidity
  • GETCalculate
  • POSTSwap
  • POSTRemove Liquidity
  • GETGet Trading Pair Price History
  • GETGet Trading Pair Swap History
  • POSTSubmit Transaction
  • GETGet User Liquidity
  • GETGet user
  • POSTAdd a new user

Create Trading Pair

post


This endpoint is used to create a new trading pair. Idempotent. If pair exists, returns existing pool address.

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
Body
base_assetstringRequiredExample: BTC
quote_assetstringRequiredExample: MYLOVELYRUNE
Responses
200
Success
application/json
400
Bad Request
application/json
404
404 is returned if pair is not found
application/json
500
Internal server error
application/json
post
POST /v1/pairs/create HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "base_asset": "BTC",
  "quote_asset": "MYLOVELYRUNE"
}
{
  "id": 2,
  "pool_address": "tb1pptp2yfl3xjvltfxwwvqnsspe60uyc0a24d90ymas4qxl8xs8rxss94quj9"
}

Add Liquidity

post


This endpoint is used to add liquidity to a trading pair.\

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
Body
base_addressstringRequiredExample: bc1pkr9xwf5n6ugue9ra4p3quy940gl3qaaju57pvvhy5xh8xehmzh3syzdqs3
base_address_pubkeystring | nullableOptionalExample: 8f0f508a694fe6991fd6fd8be19bfec9dad34afbc5e16c2c6af1b57ee4a75f28
base_amountstringRequiredExample: 41533
quote_addressstringRequiredExample: 37LHryP6Pj6Z98bQZj76YBcQ1JNKZsSXoC
quote_address_pubkeystring | nullableOptionalExample: 02c64921f5c9b2c209ada61c78719eec30bebcdfc1d63ee051a68aa241ffb3190a
quote_amountstringRequiredExample: 10000
Responses
200
Success
application/json
400
Bad Request
application/json
404
404 is returned if pair is not found
application/json
500
Internal server error
application/json
post
POST /v1/pairs/{base}-{quote}/add-liquidity HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 360

{
  "base_address": "bc1pkr9xwf5n6ugue9ra4p3quy940gl3qaaju57pvvhy5xh8xehmzh3syzdqs3",
  "base_address_pubkey": "8f0f508a694fe6991fd6fd8be19bfec9dad34afbc5e16c2c6af1b57ee4a75f28",
  "base_amount": "41533",
  "quote_address": "37LHryP6Pj6Z98bQZj76YBcQ1JNKZsSXoC",
  "quote_address_pubkey": "02c64921f5c9b2c209ada61c78719eec30bebcdfc1d63ee051a68aa241ffb3190a",
  "quote_amount": "10000"
}
{
  "request_id": "123",
  "pair_id": 2,
  "pair": "BTC/MYLOVELYRUNE",
  "base_address": "bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f",
  "quote_address": "37LHryP6Pj6Z98bQZj76YBcQ1JNKZsSXoC",
  "base_amount": "41533",
  "quote_amount": "10000",
  "btc_tx_fee": 1000,
  "psbt": "text",
  "raw_tx": "text",
  "base_inputs": [
    1
  ],
  "quote_inputs": [
    1
  ]
}

Swap

post


This endpoint is used to swap assets in a trading pair.\

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
Body
ask_addressstringRequired
ask_amountstringRequired
bid_addressstringRequired
bid_address_pubkeystring | nullableOptional
bid_amountstringRequired
bid_assetstringRequired
fee_addressstringRequired
fee_address_pubkeystring | nullableOptional
ratestringRequired
slippagenumber · doubleRequired
slippage_tolerancebooleanRequired
Responses
200
Success
application/json
400
Bad Request
application/json
404
404 is returned if pair is not found
application/json
500
Internal server error
application/json
post
POST /v1/pairs/{base}-{quote}/swap HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 232

{
  "ask_address": "text",
  "ask_amount": "text",
  "bid_address": "text",
  "bid_address_pubkey": "text",
  "bid_amount": "text",
  "bid_asset": "text",
  "fee_address": "text",
  "fee_address_pubkey": "text",
  "rate": "text",
  "slippage": 1,
  "slippage_tolerance": true
}
{
  "request_id": "123",
  "pair_id": 2,
  "pair": "BTC/MYLOVELYRUNE",
  "base_address": "bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f",
  "quote_address": "37LHryP6Pj6Z98bQZj76YBcQ1JNKZsSXoC",
  "base_amount": "41533",
  "quote_amount": "10000",
  "btc_tx_fee": 1000,
  "psbt": "text",
  "raw_tx": "text",
  "base_inputs": [
    1
  ],
  "quote_inputs": [
    1
  ]
}

Remove Liquidity

post


This endpoint is used to remove liquidity from a trading pair.\

Path parameters
basestringRequiredExample: BTC
quotestringRequiredExample: MYLOVELYRUNE
Body
base_addressstringRequired
base_amountstringRequired
fee_addressstringRequired
fee_address_pubkeystring | nullableOptional
quote_addressstringRequired
quote_amountstringRequired
Responses
200
Success
application/json
400
Bad Request
application/json
404
404 is returned if pair is not found
application/json
500
Internal server error
application/json
post
POST /v1/pairs/{base}-{quote}/remove-liquidity HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "base_address": "text",
  "base_amount": "text",
  "fee_address": "text",
  "fee_address_pubkey": "text",
  "quote_address": "text",
  "quote_amount": "text"
}
{
  "request_id": "123",
  "pair_id": 2,
  "pair": "BTC/MYLOVELYRUNE",
  "base_address": "bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f",
  "quote_address": "37LHryP6Pj6Z98bQZj76YBcQ1JNKZsSXoC",
  "base_amount": "41533",
  "quote_amount": "10000",
  "btc_tx_fee": 1000,
  "psbt": "text",
  "raw_tx": "text",
  "base_inputs": [
    1
  ],
  "quote_inputs": [
    1
  ]
}

Submit Transaction

post


This endpoint allows to submit a transaction to the Bitcoin network.\

Body
contextstring | nullableOptional
psbtstringRequired
request_idstring | nullableOptional
Responses
200
Success
application/json
400
Bad Request
application/json
post
POST /v1/publish-tx HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 52

{
  "context": "text",
  "psbt": "text",
  "request_id": "text"
}
{
  "tx_id": "af7ef135a4469ec63af59e7244693418fdb96e852baf84c0adb70b28d9ec99e1",
  "status": "pending"
}

Add a new user

post


This endpoint is used to add a new user to the database.\

Body
addressesstring[]RequiredExample: bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f
termsbooleanRequired
wallet_typestringRequired
Responses
200
Success
application/json
500
Internal server error
application/json
post
POST /v1/users HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 114

{
  "addresses": [
    "bc1p0x6psjqeawtw8zvekup2gcg8uuwejhgjfad3sp9xklmpeaq80m4qd0ly9f"
  ],
  "terms": true,
  "wallet_type": "text"
}
{
  "user_id": "text"
}