Ticket Market

Brief description

  • Market list

Request URL

  • /api/ticket-market

Method

  • POST

Parameter

Parameter name
Required
Type
Explain

is_sale

Yes

string

0:all,1:rental,2:sale

order_by

Yes

string

issue_times,price,sale_time

page

Yes

string

page

limit

Yes

string

page size

Return example

{
  "code": 0,
  "data": [
    {
      "token_id": 3,
      "user": "0xf2189edf207c35101d6240e0181b9c2004bbdc47",
      "sale_info": {
        "pay_token": "0xb8272D8DD058bDaF1d2c2337FdE1131915318dbd",
        "price": "0.100000000000000000",
        "term": "2592000",
        "amount": "1",
        "rental": true
      },
      "update_sale_time": "2022-05-08 16:22:31",
      "uri": "https://demo.cleardao.com/metadata/3.json",
      "total_supply": 1,
      "owner_status": 1
    }
  ],
  "extra": {
    "total": 1
  }
}

Return parameter description

Parameter name
Type
Explain

owner_status

int

1:for rental,2:for sale

amount

int

If the type is rent, amount is currently rental number

term

int

Rent time (s)

total_supply

int

Total number of ticket_id,1 or 3 or 5

Remark

Brief description

  • Ticket info

Request URL

  • /api/ticket-market/detail

Method

  • POST

Parameter

Parameter name
Required
Type
Explain

token_id

Yes

string

ticket_id

Return example

{
  "code": 0,
  "data": {
    "id": 4,
    "chain_type": 1,
    "from": "0x0000000000000000000000000000000000000000",
    "user": "0xf2189edf207c35101d6240e0181b9c2004bbdc47",
    "balance": 1,
    "token_id": 3,
    "is_owner": 1,
    "is_staked": 0,
    "is_grey": 0,
    "owner_status": 1,
    "expired_at": null,
    "position": 89,
    "total_supply": 1,
    "sale_info": {
      "pay_token": "0xb8272D8DD058bDaF1d2c2337FdE1131915318dbd",
      "price": "0.100000000000000000",
      "term": "2592000",
      "amount": "1",
      "rental": true
    },
    "uri": "https://demo.cleardao.com/metadata/3.json",
    "created_at": "2022-05-08 15:48:30",
    "updated_at": "2022-05-08 16:22:31",
    "update_sale_time": "2022-05-08 16:22:31",
    "price_usd": "0.10000000",
    "sale_times": 1
  },
  "extra": null
}

Return parameter description

Brief description

  • Ticket packets

Request URL

  • /api/ticket-market/packets

Method

  • POST

Parameter

Parameter name
Required
Type
Explain

user

Yes

string

User address,e.g.,:0xf2189edf207c35101d6240e0181b9c2004bbdc47

Return example

  {
  "code": 0,
  "data": [
    {
      "id": 1,
      "chain_type": 1,
      "from": "0x0000000000000000000000000000000000000000",
      "user": "0xf2189edf207c35101d6240e0181b9c2004bbdc47",
      "balance": 4,
      "token_id": 1,
      "is_owner": 1,
      "is_staked": 0,
      "is_grey": 0,
      "owner_status": 0,
      "expired_at": null,
      "position": 15,
      "total_supply": 5,
      "sale_info": [
        
      ],
      "uri": "https://demo.cleardao.com/metadata/1.json",
      "created_at": "2022-05-08 13:28:01",
      "updated_at": "2022-05-08 16:22:30",
      "update_sale_time": "2022-05-08 16:22:30",
      "price_usd": "0.00000000",
      "sale_times": 5
    },
    {
      "id": 3,
      "chain_type": 1,
      "from": "0x0000000000000000000000000000000000000000",
      "user": "0xf2189edf207c35101d6240e0181b9c2004bbdc47",
      "balance": 5,
      "token_id": 2,
      "is_owner": 1,
      "is_staked": 0,
      "is_grey": 0,
      "owner_status": 0,
      "expired_at": null,
      "position": 19,
      "total_supply": 5,
      "sale_info": "",
      "uri": "https://demo.cleardao.com/metadata/2.json",
      "created_at": "2022-05-08 15:48:12",
      "updated_at": "2022-05-08 15:48:12",
      "update_sale_time": null,
      "price_usd": "0.00000000",
      "sale_times": 0
    },
    {
      "id": 4,
      "chain_type": 1,
      "from": "0x0000000000000000000000000000000000000000",
      "user": "0xf2189edf207c35101d6240e0181b9c2004bbdc47",
      "balance": 1,
      "token_id": 3,
      "is_owner": 1,
      "is_staked": 0,
      "is_grey": 0,
      "owner_status": 1,
      "expired_at": null,
      "position": 89,
      "total_supply": 1,
      "sale_info": {
        "pay_token": "0xb8272D8DD058bDaF1d2c2337FdE1131915318dbd",
        "price": "0.100000000000000000",
        "term": "2592000",
        "amount": "1",
        "rental": true
      },
      "uri": "https://demo.cleardao.com/metadata/3.json",
      "created_at": "2022-05-08 15:48:30",
      "updated_at": "2022-05-08 16:22:31",
      "update_sale_time": "2022-05-08 16:22:31",
      "price_usd": "0.10000000",
      "sale_times": 1
    },
    {
      "id": 5,
      "chain_type": 1,
      "from": "0x0000000000000000000000000000000000000000",
      "user": "0xf2189edf207c35101d6240e0181b9c2004bbdc47",
      "balance": 5,
      "token_id": 4,
      "is_owner": 1,
      "is_staked": 0,
      "is_grey": 0,
      "owner_status": 0,
      "expired_at": null,
      "position": 87,
      "total_supply": 5,
      "sale_info": "",
      "uri": "https://demo.cleardao.com/metadata/4.json",
      "created_at": "2022-05-08 15:48:50",
      "updated_at": "2022-05-08 15:48:50",
      "update_sale_time": null,
      "price_usd": "0.00000000",
      "sale_times": 0
    }
  ],
  "extra": null
}

Return parameter description

Parameter name
Type
Explain

groupid

int

.

Remark

  • For more error code returns, see the error code description on the home page

Last updated