Crate custom tokens
POST/v1/custom-tokens
Crate custom tokens
This endpoint allows clients to generate a new custom token based on provided details such as the blockchain address and chain ID. It extracts relevant token attributes, and inserts a new token record into the database. If successful, it returns the newly created token object; otherwise, it handles errors gracefully, returning appropriate HTTP status codes and error messages.
Request
- application/json
Body
required
address stringrequired
chain_id int32required
user_id uuidnullable
Responses
- 201
- 404
- 500
Token created
- application/json
- Schema
- Example (from schema)
Schema
address stringrequired
asset_type stringrequired
chain_id int32required
coingecko_id stringnullable
decimals int32nullable
id uuidrequired
item_id stringnullable
name stringnullable
owner_address stringnullable
symbol stringnullable
token_uri stringnullable
updated_at date-timerequired
{
"address": "string",
"asset_type": "string",
"chain_id": 0,
"coingecko_id": "string",
"decimals": 0,
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"item_id": "string",
"name": "string",
"owner_address": "string",
"symbol": "string",
"token_uri": "string",
"updated_at": "2024-09-25T19:42:12.402Z"
}
Token not found
- text/plain
- Schema
Schema
string
Internal server error
- text/plain
- Schema
Schema
string
Loading...