💼Wallet Generation

The endpoint below generates a wallet for the merchant

To generate wallet address here are the required parameters

1) Currency: This is an Enum

Currency
Enum Value
Status

BTC

1

Coming Soon

LTC

2

BNB

3

USDT

4

DAI

5

BUSD

6

XEND

7

ETH

8

MATIC

9

WNT

10

USDC

11

cUSD

12

cEUR

13

CELO

14

TRX

15

USDJ

16

TUSD

17

2) NetworkChain: This is also an Enum

NetworkChain
Enum Value
VM Type

BSC

1

EVM

ETHEREUM

2

EVM

POLYGON

3

EVM

CELO

4

EVM

TRON

8

TVM

Public Key

4) ClientEmailAddress: A string

The code below will generate a wallet address for Currency: (XEND) under NetworkChain : Binance Smart Chain(BSC)

Generate a wallet address

POST BaseUrl/api/v1/walletAddress/generate

Request Body

Name
Type
Description

clientEmailAddress*

String

currency*

Enum

6

networkChain*

Enum

1

publicKey*

String

Your PublicKey

{
  "status": 1,
  "message": "",
  "data": {
    "address": "0xbc7d40320A0593d0cD5D95595a36aE7e82efBc77",
    "merchantClientId": "0e64eba8-f568-49d0-83c0-08da1df8b5ff",
    "addressGenerationStatus": 1,
    "addressGenerationMessage": null,
    "addressGenerationTransactionHash": null
  }
}

Code Gist
POST /api/v1/walletAddress/generate HTTP/1.1
Host: testnet.switchwallet.io
Authorization: ApiKey 5128620015083006430
Content-Type: application/json
Content-Length: 137

{
  "clientEmailAddress": "[email protected]",
  "currency": 6,
  "networkChain": 1,
  "publicKey": "Your publicKey"
}
Javascript
var myHeaders = new Headers();
myHeaders.append("Authorization", "ApiKey 5128620015083006430");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "clientEmailAddress": "[email protected]",
  "currency": 6,
  "networkChain": 1,
  "publicKey": "Your publicKey"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://testnet.switchwallet.io/api/v1/walletAddress/generate", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```j

Last updated