1. Currency Exchange
Partner API
  • Getting Started
    • Introduction
    • Authentication
    • Business Use Cases
  • API References
    • Balances & History
      • Get Balances
      • Get Balance History
    • Crypto Deposits
      • Get Crypto Deposit Details
      • Add Travel Rule
    • Crypto Withdrawals
      • Get Whitelisted Wallets
      • Add Whitelisted Wallet
      • Delete Whitelisted Wallet
      • Create Crypto Withdrawal
      • Get Crypto Withdrawal Details
    • SEPA Deposits
      • Get SEPA Payment Details
      • Get SEPA Deposit Details
    • SEPA Withdrawals
      • Create SEPA Withdrawal
      • Get SEPA Withdrawal Details
    • Currency Exchange
      • Get Rates
        GET
      • Create Lock
        POST
      • Create Exchange
        POST
      • Get Exchange Details
        GET
  • Integration
    • Integration Guides
    • Transaction Processing
    • Error Handling
    • Rate Limiting
    • Webhooks
      • Crypto Deposit Webhook
      • Crypto Withdrawal Webhook
      • SEPA Deposit Webhook
      • SEPA Withdrawal Webhook
      • Exchange Webhook
  • Reference
    • Supported Currencies
    • Fees
    • FAQ
    • Changelog
    • Support
  1. Currency Exchange

Create Exchange

Testing Env
http://k8s-partnera-partnera-7873f15634-69ebb7c047cac3d1.elb.eu-central-1.amazonaws.com
Testing Env
http://k8s-partnera-partnera-7873f15634-69ebb7c047cac3d1.elb.eu-central-1.amazonaws.com
POST
/v1/exchange
Executes an exchange calculated by Create Lock. The balances, amounts and rate are taken from the lock, so the exchange is executed exactly as quoted.

Processing#

The request is validated immediately - if the lock is invalid, expired or already used, or the balance is no longer sufficient, an error is returned and no exchange is created. Each lock can be used only once, so retrying a request with the same lockId never creates a second exchange.
An accepted exchange is queued for processing and the response contains its transactionId. Use it to track the status via Get Exchange Details, Get Balance History or webhooks.

Request

Authorization
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢201Created
application/json
Exchange created.
Bodyapplication/json

🟠400P4007: Validation Error
🟠400P4103: Insufficient Funds
🟠400P4201: Invalid Lock
🟠401P4001: Missing API Key
🟠401P4002: Invalid API Key
🟠403P4003: IP Not Allowed
🟠403P4004: Access Denied
🔴500P5000: Unknown Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'http://k8s-partnera-partnera-7873f15634-69ebb7c047cac3d1.elb.eu-central-1.amazonaws.com/v1/exchange' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "lockId": "364bae47-950f-4307-8d86-bc814b2ca12a"
}'
Response Response Example
201 - EUR to BTC
{
    "transactionId": "aae447ee-ebe4-4a56-a0ae-c5540846f9a4"
}
Previous
Create Lock
Next
Get Exchange Details
Built with