Skip to main content
GET
/
v4
/
swap
/
pairs
Get Swap pairs
curl --request GET \
  --url 'https://api.moonpay.com/v4/swap/pairs?apiKey='
import requests

url = "https://api.moonpay.com/v4/swap/pairs?apiKey="

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.moonpay.com/v4/swap/pairs?apiKey=', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.moonpay.com/v4/swap/pairs?apiKey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.moonpay.com/v4/swap/pairs?apiKey="

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.moonpay.com/v4/swap/pairs?apiKey=")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.moonpay.com/v4/swap/pairs?apiKey=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "baseCurrencyCode": "eth",
    "baseCurrencyNetworkCode": "ethereum",
    "quoteCurrencyCode": "btc",
    "quoteCurrencyNetworkCode": "bitcoin",
    "minSwapAmount": "0.0205",
    "maxSwapAmount": "3.4079",
    "minSwapAmountQuote": "0.00080",
    "maxSwapAmountQuote": "0.19581",
    "isSuspended": false,
    "pairName": "eth-btc"
  }
]
{
"message": "<string>",
"type": "<string>"
}

Authorizations

apiKey
string
query
required

Response

Successful response — Swap Pairs

baseCurrencyCode
string

The first cryptocurrency code for the pair.

Example:

"eth"

baseCurrencyNetworkCode
string

The first cryptocurrency network code for this pair.

Example:

"ethereum"

quoteCurrencyCode
string

The second cryptocurrency code for this pair.

Example:

"btc"

quoteCurrencyNetworkCode
string

The second cryptocurrency network code for this pair.

Example:

"bitcoin"

minSwapAmount
string

The minimum swapable amount.

Example:

"0.0205"

maxSwapAmount
string

The maximum swapable amount.

Example:

"3.4079"

minSwapAmountQuote
string

A positive integer representing the amount of quoteCurrency the customer will receive when swapping minSwapAmount of baseCurrency.

Example:

"0.00080"

maxSwapAmountQuote
string

A positive integer representing the amount of quoteCurrency the customer will receive when swapping maxSwapAmount of baseCurrency.

Example:

"0.19581"

isSuspended
boolean

Whether swap for this pair is suspended

Example:

false

pairName
string

The name of the cryptocurrency pair.

Example:

"eth-btc"