Create API key
curl --request POST \
--url https://api.worm.wtf/auth/keys/create/ \
--header 'Content-Type: application/json' \
--data '
{
"wallet_address": "<string>",
"message": "<string>",
"signature": "<string>",
"nonce": "<string>"
}
'import requests
url = "https://api.worm.wtf/auth/keys/create/"
payload = {
"wallet_address": "<string>",
"message": "<string>",
"signature": "<string>",
"nonce": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallet_address: '<string>',
message: '<string>',
signature: '<string>',
nonce: '<string>'
})
};
fetch('https://api.worm.wtf/auth/keys/create/', 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.worm.wtf/auth/keys/create/",
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([
'wallet_address' => '<string>',
'message' => '<string>',
'signature' => '<string>',
'nonce' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.worm.wtf/auth/keys/create/"
payload := strings.NewReader("{\n \"wallet_address\": \"<string>\",\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"nonce\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.worm.wtf/auth/keys/create/")
.header("Content-Type", "application/json")
.body("{\n \"wallet_address\": \"<string>\",\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"nonce\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/auth/keys/create/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet_address\": \"<string>\",\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"nonce\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"api_key": "xK9mP2nQ4rT6vW8y",
"secret": "ws_live_1f7c2a9b5d4e"
},
"meta": {},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Auth Keys
Create API key
Exchange a signed challenge payload for API credentials. The secret is only returned once.
POST
/
auth
/
keys
/
create
/
Create API key
curl --request POST \
--url https://api.worm.wtf/auth/keys/create/ \
--header 'Content-Type: application/json' \
--data '
{
"wallet_address": "<string>",
"message": "<string>",
"signature": "<string>",
"nonce": "<string>"
}
'import requests
url = "https://api.worm.wtf/auth/keys/create/"
payload = {
"wallet_address": "<string>",
"message": "<string>",
"signature": "<string>",
"nonce": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallet_address: '<string>',
message: '<string>',
signature: '<string>',
nonce: '<string>'
})
};
fetch('https://api.worm.wtf/auth/keys/create/', 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.worm.wtf/auth/keys/create/",
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([
'wallet_address' => '<string>',
'message' => '<string>',
'signature' => '<string>',
'nonce' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.worm.wtf/auth/keys/create/"
payload := strings.NewReader("{\n \"wallet_address\": \"<string>\",\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"nonce\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.worm.wtf/auth/keys/create/")
.header("Content-Type", "application/json")
.body("{\n \"wallet_address\": \"<string>\",\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"nonce\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/auth/keys/create/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet_address\": \"<string>\",\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"nonce\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"api_key": "xK9mP2nQ4rT6vW8y",
"secret": "ws_live_1f7c2a9b5d4e"
},
"meta": {},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
signature on this route = hex signature of the challenge message (wallet bootstrap). For how submit endpoints use signature, see Authentication and Submit order.Body Parameters
string
required
Wallet address used in the challenge step.
string
required
Exact challenge message returned by
POST /auth/keys/challenge/.string
required
Hex-encoded wallet signature of
message (UTF-8 bytes).string
required
Challenge nonce value.
Response
object
Issued API credential payload.
Show Data fields
Show Data fields
object
Empty object on success for this endpoint.
object | null
null on success. Error object on failed requests.{
"data": {
"api_key": "xK9mP2nQ4rT6vW8y",
"secret": "ws_live_1f7c2a9b5d4e"
},
"meta": {},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -11,
"slug": "invalid_request_params",
"message": "Validation Error",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}