Skip to main content

Token Model

The token model is the main data structure that represents token information. This page explains all fields and structure of the token model in detail.

TokenResponse

The token response model is the main token data structure used in API responses.

Fields

FieldTypeDescription
idstringUnique identifier of the token (UUID)
node_idstringID of the node the token is associated with
nodeNodeResponseNode information (optional, included in detailed responses)
distributor_idstringID of the distributor the token is associated with
currency_token_idstringID of the currency token used for payment
currency_tokenCurrencyTokenCurrency token information (optional)
chain_idintBlockchain network ID (e.g., 1 = Ethereum Mainnet, 56 = BSC)
namestringToken name
descriptionstringDescription about the token
symbolstringToken symbol (e.g., BTC, ETH, USDT)
valuefloat64Token value
supplyintTotal token supply
external_idstringToken ID in external system
contractTokenContractToken contract information
rulesTokenRulesToken rules (purchase limits)
statusintToken status (1: Pending, 2: Listed, 3: Rejected, etc.)
integrationTokenIntegrationExternal integration information
metaTokenMetaToken metadata (images, documents)
seller_addressstringAddress of the seller's related contract
created_attime.TimeToken creation date
updated_attime.TimeToken last update date
deleted_at*time.TimeToken deletion date (soft delete, optional)

TokenContract

Represents token contract information.

Fields

FieldTypeDescription
addressstringToken contract address (blockchain address)
hashstringContract hash value

Example

{
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"hash": "0x1234567890abcdef1234567890abcdef12345678"
}

TokenRules

Represents purchase rules for a token.

Fields

FieldTypeDescription
max_purchase_limitintMaximum purchase limit
min_purchase_limitintMinimum purchase limit

Example

{
"max_purchase_limit": 10000,
"min_purchase_limit": 100
}

TokenIntegration

Represents token integration parameters for external integration systems.

Fields

FieldTypeDescription
chain_idintBlockchain network ID
abistringContract ABI (Application Binary Interface)
contract_addressstringIntegration contract address
function_namestringFunction name to call
currency_token_addressstringCurrency token address used for payment
is_approvedboolToken approval status
argsTokenIntegrationArgsArguments for integration function

Example

{
"chain_id": 1,
"abi": "[{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[...]}]",
"contract_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"function_name": "mint",
"currency_token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"is_approved": true,
"args": [
{
"type": "address",
"value": "0x123...",
"description": "Recipient address"
}
]
}

TokenIntegrationArg

Represents argument information for integration function.

Fields

FieldTypeDescription
typestringArgument type (e.g., address, uint256, string)
valuestringArgument value
descriptionstringArgument description

TokenMeta

Represents token metadata information (images and documents).

Fields

FieldTypeDescription
images[]ImageImages associated with the token
documents[]DocumentDocuments associated with the token

Image

Represents token image information.

Fields

FieldTypeDescription
idstringUnique identifier of the image
urlstringImage URL address
is_defaultboolWhether this is the default image
hashstringImage hash value
created_attime.TimeCreation date
deleted_at*time.TimeDeletion date (optional)

Document

Represents token document information.

Fields

FieldTypeDescription
idstringUnique identifier of the document
namestringDocument name
urlstringDocument URL address
typeDocumentTypeDocument type (value between 1-9)
hashstringDocument hash value
created_attime.TimeCreation date
deleted_at*time.TimeDeletion date (optional)

DocumentType Values

ValueTypeDescription
1StandardStandard document
2WhitepaperWhitepaper document
3TermsOfServiceTerms of service
4PrivacyPolicyPrivacy policy
5LegalAgreementLegal agreement
6ProspectusProspectus
7AuditReportAudit report
8LicenseLicense document
9CertificateCertificate

CurrencyToken

Represents currency token information used for payment.

Fields

FieldTypeDescription
idstringUnique identifier of the currency token
namestringCurrency token name (e.g., USD Coin)
symbolstringCurrency token symbol (e.g., USDC)
decimalsintCurrency token decimal places
addressstringCurrency token contract address
chain_idintBlockchain network ID

Example

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1
}

Complete Token Example

Below is a complete token response example with all fields:

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"node_id": "550e8400-e29b-41d4-a716-446655440001",
"node": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Example Node",
"status": 1
},
"distributor_id": "550e8400-e29b-41d4-a716-446655440002",
"currency_token_id": "550e8400-e29b-41d4-a716-446655440003",
"currency_token": {
"id": "550e8400-e29b-41d4-a716-446655440003",
"name": "USD Coin",
"symbol": "USDC",
"decimals": 6,
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chain_id": 1
},
"chain_id": 1,
"name": "My Token",
"description": "This is an example token with comprehensive metadata",
"symbol": "MTK",
"value": 1.5,
"supply": 1000000,
"external_id": "EXT-12345",
"contract": {
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"hash": "0x1234567890abcdef1234567890abcdef12345678"
},
"rules": {
"max_purchase_limit": 10000,
"min_purchase_limit": 100
},
"status": 2,
"integration": {
"chain_id": 1,
"abi": "[{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}]}]",
"contract_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"function_name": "mint",
"currency_token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"is_approved": true,
"args": [
{
"type": "address",
"value": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"description": "Recipient address for token minting"
},
{
"type": "uint256",
"value": "1000000000000000000",
"description": "Amount to mint in wei"
}
]
},
"meta": {
"images": [
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"url": "https://example.com/images/token-logo.png",
"is_default": true,
"hash": "abc123def456",
"created_at": "2024-01-01T00:00:00Z",
"deleted_at": null
},
{
"id": "550e8400-e29b-41d4-a716-446655440005",
"url": "https://example.com/images/token-banner.png",
"is_default": false,
"hash": "def456ghi789",
"created_at": "2024-01-01T00:00:00Z",
"deleted_at": null
}
],
"documents": [
{
"id": "550e8400-e29b-41d4-a716-446655440006",
"name": "Token Whitepaper",
"url": "https://example.com/documents/whitepaper.pdf",
"type": 2,
"hash": "whitepaper123",
"created_at": "2024-01-01T00:00:00Z",
"deleted_at": null
},
{
"id": "550e8400-e29b-41d4-a716-446655440007",
"name": "Terms of Service",
"url": "https://example.com/documents/terms.pdf",
"type": 3,
"hash": "terms456",
"created_at": "2024-01-01T00:00:00Z",
"deleted_at": null
}
]
},
"seller_address": "0x1234567890123456789012345678901234567890",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"deleted_at": null
}

Token Statuses

Token statuses are as follows:

ValueStatusDescription
1Pending ApprovalPending approval
2ListedListed (active)
3RejectedRejected
4DelistedDelisted

Webhook Token Format

The token format sent in webhooks (TokenWebhook) is essentially the same as TokenResponse, but only IDs are sent instead of nested objects like node and currency_token:

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"currency_token_id": "550e8400-e29b-41d4-a716-446655440003",
"chain_id": 1,
"node_id": "550e8400-e29b-41d4-a716-446655440001",
"distributor_id": "550e8400-e29b-41d4-a716-446655440002",
"name": "My Token",
"symbol": "MTK",
"description": "Token description",
"value": 1.5,
"supply": 1000000,
"external_id": "EXT-12345",
"contract": {
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"hash": "0x1234567890abcdef1234567890abcdef12345678"
},
"rules": {
"max_purchase_limit": 10000,
"min_purchase_limit": 100
},
"status": 2,
"integration": {
"chain_id": 1,
"abi": "[...]",
"contract_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"function_name": "mint",
"currency_token_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"is_approved": true,
"args": []
},
"meta": {
"images": [],
"documents": []
},
"seller_address": "0x1234567890123456789012345678901234567890",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}