curl --request POST \
--url https://20b9-41-90-209-232.ngrok-free.app/v1/swaps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"quote_id": "e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e"
}
'const url = 'https://20b9-41-90-209-232.ngrok-free.app/v1/swaps';
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({quote_id: 'e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://20b9-41-90-209-232.ngrok-free.app/v1/swaps"
payload = { "quote_id": "e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://20b9-41-90-209-232.ngrok-free.app/v1/swaps"
payload := strings.NewReader("{\n \"quote_id\": \"e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "swap",
"id": "14d2759d-c6b1-5e5f-85b2-af84bc650f57",
"status": "processing",
"origin": "keette",
"from": "USD",
"to": "NGN",
"amount_from": 10000,
"amount_to": 1550000,
"scale_from": 2,
"scale_to": 2,
"fx_rate": "155.00",
"quote_id": "e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e",
"stan": "SWP-2610-ABCDEF12",
"created_at": "2026-10-27T13:00:00Z",
"updated_at": "2026-10-27T13:00:01Z"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API key provided."
}
}Create Swap
Move funds between your own books using a firm quote from
POST /fx/quotes with purpose: swap. Requires Idempotency-Key.
The API key replaces the workspace PIN.
curl --request POST \
--url https://20b9-41-90-209-232.ngrok-free.app/v1/swaps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"quote_id": "e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e"
}
'const url = 'https://20b9-41-90-209-232.ngrok-free.app/v1/swaps';
const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({quote_id: 'e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e'})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://20b9-41-90-209-232.ngrok-free.app/v1/swaps"
payload = { "quote_id": "e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://20b9-41-90-209-232.ngrok-free.app/v1/swaps"
payload := strings.NewReader("{\n \"quote_id\": \"e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "swap",
"id": "14d2759d-c6b1-5e5f-85b2-af84bc650f57",
"status": "processing",
"origin": "keette",
"from": "USD",
"to": "NGN",
"amount_from": 10000,
"amount_to": 1550000,
"scale_from": 2,
"scale_to": 2,
"fx_rate": "155.00",
"quote_id": "e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e",
"stan": "SWP-2610-ABCDEF12",
"created_at": "2026-10-27T13:00:00Z",
"updated_at": "2026-10-27T13:00:01Z"
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API key provided."
}
}Authorizations
Secret API key from Settings → Developers → API keys.
Example: Authorization: Bearer sk_test_…
Headers
Client-generated key so retries do not create duplicate swaps.
1 - 128Body
Id from POST /fx/quotes with purpose: swap. Must still be
unexpired and unused.
"e6bd10ee-6e53-4aaa-9cd0-a2bb980cf73e"
Response
Swap (processing, completed, or failed)
Object type discriminator.
swap Swap id.
Lifecycle status of the book-to-book transfer.
processing, completed, failed, reversed Debited book currency.
Credited book currency.
Debit amount in Ledger minor units.
Credit amount in Ledger minor units.
System trace / reference shown in statements.
How the swap was initiated (keette for API/dashboard).
Decimal places for from.
Decimal places for to.
Applied rate as a decimal string.
Firm quote that locked the rate.
Failure or reversal reason when applicable.
Creation time (UTC).
Last status change (UTC).
When the swap finished successfully, if completed.