Blockchain API - Token City
REST API for queries and transaction generation on the blockchain networks where Token City operates.
This is v2.0.0 — the next major version still under construction. v1.8.1 is the current stable version. See breaking changes below before migrating.
Breaking changes from v1.8.1
1. URL versioning prefix
All v2.0.0 endpoints use a /v2/ path prefix (e.g. GET /v2/tokens/{tokenId}/holders). v1.8.1 had no prefix. You must prepend /v2/ to every path when migrating.
2. Paginated list response shape
In v1.8.1 list endpoints returned a bare JSON array [ ... ]. In v2.0.0 every list endpoint returns a paginated envelope:
{ "items": [ ... ], "hasNext": true, "nextCursor": "..." }
Consumers that destructure or iterate the response directly must be updated.
Authentication
All endpoints require HMAC authentication via three request headers:
Authorization: your API keyDate: UTC request timestamp in RFC 7231 format (e.g.Fri, 02 Feb 1996 03:04:05 GMT)Signature:TC sha256 <hex-encoded-HMAC-SHA256-signature>
Error format
All error responses use a consistent JSON envelope:
{ "success": false, "status": 400, "result": { "error": { "message": "..." } }, "requestId": "uuid" }
The requestId field is also returned as the X-Request-Id response header for correlation and support purposes.
What's new in v2.0.0
The following endpoints are new in v2.0.0 with no v1.8.1 counterpart (marked x-new-in-v2: true in the spec):
POST /v2/erc1155/{tokenId}/mint— ERC-1155 multi-token mintPOST /v2/erc1155/{tokenId}/mint/eip712-typed-data— ERC-1155 EIP-712 typed dataPOST /v2/erc1155/{tokenId}/transfer— ERC-1155 token transferPOST /v2/erc1155/{tokenId}/upload-documents— physical asset document upload to ArweavePOST /v2/erc20/{tokenId}/transfer— ERC-20 transfer (new path pattern)POST /v2/factory/erc3643-diamond— Diamond proxy (ERC-2535) token deploymentPOST /v2/factory/erc3643-diamond/eip712-typed-data— Diamond deployment EIP-712 typed dataPOST|GET /v2/erc3643/{tokenId}/bond— Bond parameter configuration and retrievalGET /v2/erc3643/{tokenId}/bond/{holder}/earned-interest— Per-holder earned interest queryGET|POST /v2/approvals/{tokenId}/permit— ERC-20 permit approvalGET /v2/tokens/{tokenId}/accounts/{accountId}/burns— Per-account burn history
Deployment schemas
v2.0.0 supports two ERC-3643 factory deployment paths with different response shapes:
POST /v2/factory/erc3643— standard deployment, returnsTokenDeployed({ result: { id, contractId, message, contractAddress } })POST /v2/factory/erc3643-diamond— Diamond proxy deployment, returnsTokenDiamondDeployed(same shape with arequiredconstraint on all result fields)
Authentication
- API Key: hmacAuth
Token City HMAC authentication. Authorization header = API key. Date header = UTC timestamp (RFC 7231). Signature header = TC sha256 <hex-encoded-HMAC-SHA256>.
Security Scheme Type: | apiKey |
|---|---|
Header parameter name: | Authorization |
Terms of Service
https://www.token-city.com/tc-token-cityLicense
Proprietary