Bridge cNGN

Bridge Quote

POST https://api.cngn.co/v1/api/swap-quote

This endpoint returns the final amount you get from the bridge after fee deduction

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description
Required

destinationNetwork

string

Destination Network you are swapping to; see Network Enum

Yes

destinationAddress

string

Destination Wallet Address

Yes

originNetwork

string

Network you are swapping from

Yes

amount

string

A call Back URL to notify you if swap is successful

Yes

Response

{
  "status": 200,
  "message": "Swap quote fetched successfully",
  "data": "<encrypted response>"
}

Decrypted Response

{
  "status": 200,
  "message": "Swap quote fetched successfully",
  "data": {
    "amountReceivable": "280",
    "networkFee": "100",
    "bridgeFee": "0.3"
  }
}

Bridge

POST https://api.cngn.co/v1/api/swap

This endpoint allows you to bridge or move your cNGN between blockchains that cNGN is supported

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body

Name
Type
Description
Required

destinationNetwork

string

Destination Network you are swapping to; see Network Enum

Yes

destinationAddress

string

Destination Wallet Address

Yes

originNetwork

string

Network you are swapping from

Yes

callbackUrl

string

A call Back URL to notify you if swap is successful

No

senderAddress

string

Wallet Address where the fund will be sent from. If you are sending from an already existing whitelisted address, this field is optional

No

Response

{
  "status": 200,
  "message": "Swap was successfully",
  "data": "<encrypted response>"
}

Decrypted Response

{
  "status": 200,
  "message": "Swap was successfully",
  "data": {
    "receivableAddress": "0xb68459978a9FBD3BB3e45ed5972479c0f7711fe5",
    "transactionId": "c46a5f10-de39-4afb-b539-ed5b134a0fcd",
    "reference": "REF456198239930"
  }
}

Last updated