Tokens

Tokens are the heartbeat of the Ark NFT ecosystem, representing unique digital assets.

The Token Model

The token model encapsulates the intricate details of individual tokens within a contract on the ArkProject platform. Each token is uniquely identified by its token_id and is tethered to a specific contract_address, which denotes the contract it belongs to. The type property further classifies the nature of the token within that contract.

Every token is associated with a current_owner, indicating the current holder of the token.

Properties

  • Name
    token_chain_id
    Type
    string
    Description

    Unique id of the chain.

  • Name
    token_address
    Type
    string
    Description

    Unique identifier for the token contract.

  • Name
    token_id
    Type
    string
    Description

    Token ID.

  • Name
    current_owner
    Type
    string
    Description

    The address of the owner of the token.

  • Name
    listed_timestamp
    Type
    i64
    Description

    The listed timestamp of the token.

  • Name
    updated_timestamp
    Type
    i64
    Description

    Last event timestamp.

  • Name
    current_price
    Type
    string
    Description

    Price of the token.

  • Name
    quantity
    Type
    string
    Description

    Quantity of the token

  • Name
    start_amount
    Type
    string
    Description

    Price the owner wants to sell the token.

  • Name
    end_amount
    Type
    string
    Description

    Max price for a bid.

  • Name
    start_date
    Type
    string
    Description

    Start date of the sell.

  • Name
    end_date
    Type
    string
    Description

    End date of the sell.

  • Name
    broker_id
    Type
    string
    Description

    Broker where the token is on sale.

  • Name
    is_listed
    Type
    boolean
    Description

    True if the token is listed.

  • Name
    has_offer
    Type
    boolean
    Description

    True if the token has at least one offer.


GETtoken/{contract_address}/{token_id}

Retrieve a token

This endpoint allows you to retrieve a token by providing its contract address and its token ID. Refer to the list at the top of this page to see which properties are included with token objects.

Path parameters

  • Name
    contract_address
    Type
    string
    Description

    Hexadecimal address of the contract.

  • Name
    token_id
    Type
    string
    Description

    Hexadecimal or decimal token ID.

Request

GET
/token/{contract_address}/{token_id}
curl https://api-orderbook.arkproject.dev/token/{contract_address}/{token_id}

Response

{
"result": {
    "token_chain_id": "0x000001",
    "contract_address": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
    "token_id": "0x000000000000000000000000000000000000000000000000000000000098db9a",
    "current_owner": "0x00a69e64b09ef9830305c3e3166e2b42b3b38edd054c18a9105974f7eb949826",
    "listed_timestamp": "1234567890",
    "updated_timestamp": "1234569890",
    "quantity": "1",
    "start_amount": "2",
    "end_amount": "",
    "start_date": "",
    "end_date": "",
    "broker_id": "0x000002",
    "is_listed": "true",
    "has_offer": "false",
}
}

GET/tokens/collection/{collection_id}

List all token for a collection

This endpoint allows you to retrieve a list of all tokens of a collection.

Path parameters

  • Name
    contract_address
    Type
    string
    Description

    Hexadecimal address of the contract.

  • Name
    token_id
    Type
    string
    Description

    Hexadecimal or decimal token ID.

Request

GET
/tokens/collection/{contract_address}
curl -G https://api-orderbook.arkproject.dev/tokens/collection/{contract_address}

Response

{
  "result": [
    {
      "token_chain_id": "0x000001",
      "contract_address": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
      "token_id": "0x000000000000000000000000000000000000000000000000000000000098db9a",
      "current_owner": "0x00a69e64b09ef9830305c3e3166e2b42b3b38edd054c18a9105974f7eb949826",
      "listed_timestamp": "1234567890",
      "updated_timestamp": "1234569890",
      "quantity": "1",
      "start_amount": "2",
      "end_amount": "",
      "start_date": "",
      "end_date": "",
      "broker_id": "0x000002",
      "is_listed": "true",
      "has_offer": "false",
    },
    {
     "token_chain_id": "0x000001",
     "contract_address": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
     "token_id": "0x000000000000000000000000000000000000000000000000000000000098db9a",
     "current_owner": "0x00a69e64b09ef9830305c3e3166e2b42b3b38edd054c18a9105974f7eb949826",
     "listed_timestamp": "1234567890",
     "updated_timestamp": "1234569890",
     "quantity": "1",
     "start_amount": "2",
     "end_amount": "",
     "start_date": "",
     "end_date": "",
     "broker_id": "0x000004",
     "is_listed": "true",
     "has_offer": "true",
    }
  ]
}

GET/v1/tokens/{account_address}

List Tokens for an Owner

Retrieves a list of all tokens associated with a specific account. This endpoint provides a comprehensive view of an owner's holdings within the Ark NFT ecosystem.

Path parameters

  • Name
    account_address
    Type
    string
    Description

    Hexadecimal address of the account contract.

Request

GET
/tokens/{account_address}
    curl https://api-orderbook.arkproject.dev/token/{account_address}

Response

   {
     "result": [
       {
         "token_chain_id": "0x000001",
         "contract_address": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
         "token_id": "0x000000000000000000000000000000000000000000000000000000000098db9a",
         "current_owner": "0x00a69e64b09ef9830305c3e3166e2b42b3b38edd054c18a9105974f7eb949826",
         "listed_timestamp": "1234567890",
         "updated_timestamp": "1234569890",
         "quantity": "1",
         "start_amount": "2",
         "end_amount": "",
         "start_date": "",
         "end_date": "",
         "broker_id": "0x000002",
         "is_listed": "true",
         "has_offer": "false",
       },
       {
        "token_chain_id": "0x000001",
        "contract_address": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
        "token_id": "0x000000000000000000000000000000000000000000000000000000000098db9a",
        "current_owner": "0x00a69e64b09ef9830305c3e3166e2b42b3b38edd054c18a9105974f7eb949826",
        "listed_timestamp": "1234567890",
        "updated_timestamp": "1234569890",
        "quantity": "1",
        "start_amount": "2",
        "end_amount": "",
        "start_date": "",
        "end_date": "",
        "broker_id": "0x000004",
        "is_listed": "true",
        "has_offer": "true",
       }
     ]
   }