CreateDepositWallet
curl --request POST \
--url https://api.mpcvault.com/v1/sweep/wallets \
--header 'Content-Type: application/json' \
--header 'x-mtoken: <api-key>' \
--data '
{
"network": "EVM",
"ref": "customer-wallet-001"
}
'import requests
url = "https://api.mpcvault.com/v1/sweep/wallets"
payload = {
"network": "EVM",
"ref": "customer-wallet-001"
}
headers = {
"x-mtoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-mtoken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({network: 'EVM', ref: 'customer-wallet-001'})
};
fetch('https://api.mpcvault.com/v1/sweep/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mpcvault.com/v1/sweep/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'network' => 'EVM',
'ref' => 'customer-wallet-001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-mtoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mpcvault.com/v1/sweep/wallets"
payload := strings.NewReader("{\n \"network\": \"EVM\",\n \"ref\": \"customer-wallet-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-mtoken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mpcvault.com/v1/sweep/wallets")
.header("x-mtoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"network\": \"EVM\",\n \"ref\": \"customer-wallet-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mpcvault.com/v1/sweep/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-mtoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network\": \"EVM\",\n \"ref\": \"customer-wallet-001\"\n}"
response = http.request(request)
puts response.read_body{
"address": "0x59b4a4Fd7bC1BAA0e6BB65cBFe3e2E4dbFa5E0a1",
"network": "EVM",
"ref": "customer-wallet-001"
}Deposit & Sweep
CreateDepositWallet
Create a dedicated deposit address for a user.
POST
/
v1
/
sweep
/
wallets
CreateDepositWallet
curl --request POST \
--url https://api.mpcvault.com/v1/sweep/wallets \
--header 'Content-Type: application/json' \
--header 'x-mtoken: <api-key>' \
--data '
{
"network": "EVM",
"ref": "customer-wallet-001"
}
'import requests
url = "https://api.mpcvault.com/v1/sweep/wallets"
payload = {
"network": "EVM",
"ref": "customer-wallet-001"
}
headers = {
"x-mtoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-mtoken': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({network: 'EVM', ref: 'customer-wallet-001'})
};
fetch('https://api.mpcvault.com/v1/sweep/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mpcvault.com/v1/sweep/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'network' => 'EVM',
'ref' => 'customer-wallet-001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-mtoken: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mpcvault.com/v1/sweep/wallets"
payload := strings.NewReader("{\n \"network\": \"EVM\",\n \"ref\": \"customer-wallet-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-mtoken", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mpcvault.com/v1/sweep/wallets")
.header("x-mtoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"network\": \"EVM\",\n \"ref\": \"customer-wallet-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mpcvault.com/v1/sweep/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-mtoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"network\": \"EVM\",\n \"ref\": \"customer-wallet-001\"\n}"
response = http.request(request)
puts response.read_body{
"address": "0x59b4a4Fd7bC1BAA0e6BB65cBFe3e2E4dbFa5E0a1",
"network": "EVM",
"ref": "customer-wallet-001"
}Creates a deposit address bound to your business reference. Idempotent on
(API token, network, ref): repeated calls return the same address, so it is safe to retry. An EVM address works on all five chains.
If you only use one EVM chain, a
ref like arbitrum_<user_uuid> makes wallets easy to tell apart.Sweep uses a separate API token issued by MPCVault - see the Sweep Overview.
Errors
All errors return a JSON object withcode, error, and reason fields:
{
"code": 400,
"error": "Bad Request",
"reason": "ref required"
}
| Reason | Description |
|---|---|
network required / network unsupported | network missing or unsupported |
ref required / ref invalid | ref missing, too long, or contains invalid characters |
unauthenticated | x-mtoken missing or invalid |
IP is not allowed | Request IP not allowlisted |
sweep config not configured | Sweep parameters not configured; contact MPCVault |
wallet disabled | Address disabled |
wallet address conflict; retry | Address allocation conflict; retry |
internal server error | Server-side error |
Authorizations
Your API token. Required for all API requests.
Body
application/json
Response
200 - application/json
Success
Was this page helpful?