💳 Wallets Endpoint
Overview
The /wallets
endpoint allows you to create a list of wallets. You need to specify the number of wallets you want to create in the request body. The endpoint returns an array of objects, each containing the public and private key for each wallet.
Endpoint
POST /wallets
Request Body
The request body should be a JSON object with the following property:
Property | Type | Required | Description | Example |
---|---|---|---|---|
number | number | Yes | The number of wallets to create. | 5 |
Response
A successful response will be a JSON object containing the response status and an array of wallet objects. Each wallet object will have the following properties:
Property | Type | Description |
---|---|---|
publicKey | string | The public key of the wallet. |
privateKey | string | The private key of the wallet. |
Examples
- JavaScript
- Python
- Curl
const fetch = require('node-fetch');
const url = "https://pumpapi.dev/wallets";
const payload = {
number: 5
};
await fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
import requests
url = "https://pumpapi.dev/wallets"
payload = {
"number": 5
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
curl -X POST https://pumpapi.dev/wallets \
-H "Content-Type: application/json" \
-d '{ "number": 5 }'
Response Example
{
"status": 200,
"wallets": [
{
"publicKey": "ABCDEFG1234567890HIJKLMNOPQRSTUV",
"privateKey": "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
{
"publicKey": "WXYZ1234567890ABCDEFGHIJKLMNOPQRST",
"privateKey": "ZYXWVUTSRQPONMLKJIHGFEDCBA098765"
},
{
"publicKey": "QRST1234567890ABCDEFGHIJKLMNOPUVWX",
"privateKey": "567890ABCDEFGHIJKLMNOPQRST1234567890"
},
{
"publicKey": "UVWXYZ1234567890ABCDEFGHIJKLMNOPQRST",
"privateKey": "ABCDEFGHIJKLMNOPQRSTUVWXYZ0987654321"
},
{
"publicKey": "IJKLMNOPQRST1234567890ABCDEFGHIJKLMNOP",
"privateKey": "87654321ABCDEFGHIJKLMNOPQRSTUVWXYZ098765"
}
]
}