Integration Example

Integration Example: Tokenizing and Trading a Watch

Below is a Python snippet demonstrating API usage with the requests library

import requests

# Authenticate
headers = {"Authorization": "Bearer YOUR_JWT_TOKEN"}

# Tokenize a Rolex
tokenize_payload = {
    "asset_type": "luxury_goods",
    "metadata": {"model": "Rolex Daytona", "serial": "X12345", "value": 15000},
    "fraction_size": 0.01
}
response = requests.post("https://api.tokery.io/v1/tokenize", json=tokenize_payload, headers=headers)
asset_id = response.json()["asset_id"]

# Check status
status = requests.get(f"https://api.tokery.io/v1/assets/{asset_id}", headers=headers).json()

# List on marketplace
trade_payload = {
    "token_id": status["token_address"],
    "amount": 100,
    "payment_token": "TOKERY"
}
requests.post("https://api.tokery.io/v1/marketplace/trade", json=trade_payload, headers=headers)

This workflow tokenizes a $15,000 Rolex into 1,500 tokens (1% fractions), lists 100 for sale, and completes in under 5 minutes.

Last updated