List swaps
curl --request GET \
--url https://api.example.com/exchange/swapimport requests
url = "https://api.example.com/exchange/swap"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/exchange/swap', 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.example.com/exchange/swap",
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.example.com/exchange/swap"
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.example.com/exchange/swap")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/exchange/swap")
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{
"data": [
{
"correlation_id": "7da742ea-a1bc-11ee-b907-560f156a658b",
"created_at": "2021-01-01T00:00:00Z",
"customer": {
"email": "customer@email.com",
"id": "1",
"name": "User 1",
"type": "user"
},
"id": "7da8e726-a1bc-11ee-80cf-560f156a658b",
"provider": {
"email": "provider@email.com",
"id": "1",
"name": "Provider 1",
"type": "provider"
},
"source_amount": {
"amount": 1,
"currency": "USD"
},
"status": "success",
"symbol": "USD-NGN",
"target_amount": {
"amount": 1000,
"currency": "NGN"
},
"updated_at": "2021-01-01T00:00:00Z"
}
],
"pagination": {
"after": "b101f718-d133-450c-a572-c281c7341803",
"before": null,
"limit": 15
}
}exchange
List swaps
GET
/
exchange
/
swap
List swaps
curl --request GET \
--url https://api.example.com/exchange/swapimport requests
url = "https://api.example.com/exchange/swap"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/exchange/swap', 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.example.com/exchange/swap",
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.example.com/exchange/swap"
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.example.com/exchange/swap")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/exchange/swap")
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{
"data": [
{
"correlation_id": "7da742ea-a1bc-11ee-b907-560f156a658b",
"created_at": "2021-01-01T00:00:00Z",
"customer": {
"email": "customer@email.com",
"id": "1",
"name": "User 1",
"type": "user"
},
"id": "7da8e726-a1bc-11ee-80cf-560f156a658b",
"provider": {
"email": "provider@email.com",
"id": "1",
"name": "Provider 1",
"type": "provider"
},
"source_amount": {
"amount": 1,
"currency": "USD"
},
"status": "success",
"symbol": "USD-NGN",
"target_amount": {
"amount": 1000,
"currency": "NGN"
},
"updated_at": "2021-01-01T00:00:00Z"
}
],
"pagination": {
"after": "b101f718-d133-450c-a572-c281c7341803",
"before": null,
"limit": 15
}
}⌘I