Swap

To call APIs for swapping currency

You must have the Authorization to use this API

Swap

POST {{baseUrl}}/wp-json/rimplenet-wallet-addon/v1/swap

Request Body

Name
Type
Description

request_id *

String

Enter the request id

amount *

int

Enter the amount

user_id*

String

This is the unique identifier of the user

wallet_from*

String

Sender's wallet address

wallet_to *

String

Reciever's wallet address

deductions*

String

Amount deducted

{
    "status_code": 200,
    "status": true,
    "message": "Swap Successful",
    "data": {
        "swap_user_id": 1,
        "swap_from_request_id": "swap_debit_12",
        "swap_from_transaction_id": 264,
        "swap_from_amount": 5,
        "swap_from_wallet_id": "usd",
        "swap_to_request_id": "swap_credit_12",
        "swap_to_transaction_id": 265,
        "swap_to_amount": 5,
        "swap_to_wallet_id": "ngn"
    },
    "submitted": {
        "request_id": "12",
        "user_id": "1",
        "amount_to_convert": "5",
        "wallet_from": "usd",
        "wallet_to": "ngn",
        "note": ""
    }
}

To view request params, click on the arrow (>) at the right-hand side of the endpoint URL to expand or collapse

{
    "status_code": 200,
    "status": true,
    "message": "Swap Successful",
    "data": {
        "swap_user_id": 1,
        "swap_from_request_id": "swap_debit_12",
        "swap_from_transaction_id": 264,
        "swap_from_amount": 5,
        "swap_from_wallet_id": "usd",
        "swap_to_request_id": "swap_credit_12",
        "swap_to_transaction_id": 265,
        "swap_to_amount": 5,
        "swap_to_wallet_id": "ngn"
    },
    "submitted": {
        "request_id": "12",
        "user_id": "1",
        "amount_to_convert": "5",
        "wallet_from": "usd",
        "wallet_to": "ngn",
        "note": ""
    }
}

Last updated