Wallet Unlink
curl --request POST \
--url https://www.aionmarket.com/bvapi/wallet/unlink \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/wallet/unlink"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.aionmarket.com/bvapi/wallet/unlink', 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://www.aionmarket.com/bvapi/wallet/unlink",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.aionmarket.com/bvapi/wallet/unlink"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.aionmarket.com/bvapi/wallet/unlink")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/wallet/unlink")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"error": "<string>"
}Wallet
Wallet Unlink
Revert from self-custody back to managed wallet.
Restores the managed wallet mode. Users can switch back and forth freely between managed and self-custody.
Rate limited: 10 attempts per hour per API key.
POST
/
wallet
/
unlink
Wallet Unlink
curl --request POST \
--url https://www.aionmarket.com/bvapi/wallet/unlink \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.aionmarket.com/bvapi/wallet/unlink"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.aionmarket.com/bvapi/wallet/unlink', 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://www.aionmarket.com/bvapi/wallet/unlink",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.aionmarket.com/bvapi/wallet/unlink"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.aionmarket.com/bvapi/wallet/unlink")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.aionmarket.com/bvapi/wallet/unlink")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"error": "<string>"
}Revert from self-custody back to managed wallet.
Overview
Restores the user’s managed wallet from the previous state. Users can switch back and forth freely between managed and self-custody.What Happens
mk_ai_agent.wallet_addressis cleared (set toNULL)- All wallet credential rows for the user are physically deleted from
mk_ai_agent_wallet_credential. This is intentional: the table has a unique index onapi_key, and a soft-deleted row would block the same key from being re-registered against a different(wallet_address, signature_type)pair (e.g. migrating from an EOA to its Polymarket Deposit Wallet). - The user can re-link a wallet at any time via the challenge flow.
Unlink is destructive. The CLOB API key / secret / passphrase that
were stored for the user are removed from Aion’s database and cannot be
recovered through Aion. They can still be re-derived from the user’s
private key via Polymarket’s auth endpoint.
In most cases you do not need to call
/wallet/unlink before
re-registering. POST /wallet/credentials automatically reclaims the
api_key slot when you register the same key against a different
(walletAddress, signatureType) pair — for example, when switching
from the bare EOA (signatureType=0) to the user’s Polymarket Deposit
Wallet (signatureType=3) after detecting it via the profile API.Rate Limiting
- 10 attempts per hour per API key (IP-based)
Re-linking
After unlinking, you can link the same or a different wallet by going through the challenge flow again:GET /wallet/link/challenge?address=0x...POST /wallet/linkwith the signed challenge