LogoLogo
  • Horizon Network
    • What is Horizon Network?
    • API Document
      • Horizon Network API
      • Quick Start
      • API Reference
        • Assets
        • Collections
        • Orders
        • Offers
        • Events
        • Statistics
        • Categories
        • Chains
        • Request an API key
    • SDKs Document
      • SDKs overview
      • NODE SDK
        • Installation
        • Initialization
        • Basic Example
          • Assets Management
          • Marketplace
        • Reference
          • Assets
          • Collections
          • Offers
          • Orders
          • Categories
          • Events
          • Statistics
          • Blockchain and Layer 2
      • JAVASCRIPT SDK
        • Overview
        • Installation
        • Quickstart
        • Reference
    • Launching NFT Collection
      • Launch A Collection
        • Overview
        • Part 1: Register as a user
        • Part 2: Deploy a smart contract
        • Part 3: Set creator earnings
        • Horizon Example Repository
      • Creating Your NFT Smart Contract
        • Overview
        • Getting Started
        • Setting a basic project
        • Minting from your new contract
        • Add your own NFT contract to Horizon Network
    • Horizon Network's Layer 2 Solution
      • Why Horizon Network?
      • Horizon Network's layer 2 Solutions
      • Basic Concepts
  • Horizon Land Metaverse
    • Feature
      • LAND in the metaverse
      • NFT Avatar
      • Horizon Center
      • Game Center
      • Shopping Center
      • Music Center
      • Play to Earn
      • Social Activities
      • Finance Center
      • Marketplace
      • Experience Mode
      • Zon Token
    • Stake Holder
      • Players
      • Creators
      • Land Owners
      • Partners
      • Investors
    • Economy
      • Revenue Stream
  • Technology
    • Blockchain
    • Product
    • System
    • Wallet
    • Security
    • Token
  • Tokenomic
  • Investor & Partner
  • Roadmap
  • Contact
  • Conclusion
  • Recommendation
  • FAQs
    • Policy
    • Terms of Use
Powered by GitBook
On this page
  1. Horizon Network
  2. API Document
  3. API Reference

Offers

PreviousOrdersNextEvents

Last updated 2 years ago

Get a list of offers

Get detail of a offer

Create an offer

Accept an offer

Get list of offers

get

Get list of offers

Query parameters
chain_idstringOptional

Chain ID

token_addressstringOptional

Token address

token_idstringOptional

Token ID

owner_idstringOptional

Owner ID

statusstringOptional

Status of these offers

limitintegerOptional

Limit

pagestringOptional

Current page number

order_bystring · enumOptional

Property to sort by

Possible values:
directionstring · enumOptional

Direction to sort

Possible values:
Responses
200
OK
application/json
400
Bad Request
application/json
500
Internal Server Error
application/json
get
GET /v1/offers HTTP/1.1
Host: api.sandbox.horizonland.app
Accept: */*
{
  "cursor": "text",
  "remaining": 1,
  "result": [
    {
      "assets": {
        "cursor": "text",
        "remaining": 1,
        "result": [
          {
            "collection": {
              "image_url": "text",
              "name": "text",
              "contract_address": "text"
            },
            "created_at": "text",
            "description": "text",
            "fees": [
              {
                "address": "text",
                "basis_points": 1,
                "type": "text"
              }
            ],
            "id": "text",
            "image_url": "text",
            "animation_url": "text",
            "external_link": "text",
            "metadata": {},
            "name": "text",
            "listing": {
              "closing_date": "text",
              "fees": [
                {
                  "address": "text",
                  "basis_points": 1,
                  "type": "text"
                }
              ],
              "accept_price": 1,
              "start_price": 1,
              "current_price": 1,
              "name": "text",
              "token_address": "text",
              "token_id": "text",
              "chain": {
                "id": "text",
                "name": "text",
                "symbol": "text"
              }
            },
            "status": "text",
            "token_address": "text",
            "token_id": "text",
            "chain": {
              "id": "text",
              "name": "text",
              "symbol": "text"
            },
            "updated_at": "text",
            "owner": "text"
          }
        ]
      },
      "taker": "text",
      "price": 1,
      "start_time": "text",
      "end_time": "text"
    }
  ]
}

Get detail of an offer

get

Get detail of an offer

Path parameters
idstringRequired

ID of offer

Responses
200
OK
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
get
GET /v1/offers/{id} HTTP/1.1
Host: api.sandbox.horizonland.app
Accept: */*
{
  "assets": {
    "cursor": "text",
    "remaining": 1,
    "result": [
      {
        "collection": {
          "image_url": "text",
          "name": "text",
          "contract_address": "text"
        },
        "created_at": "text",
        "description": "text",
        "fees": [
          {
            "address": "text",
            "basis_points": 1,
            "type": "text"
          }
        ],
        "id": "text",
        "image_url": "text",
        "animation_url": "text",
        "external_link": "text",
        "metadata": {},
        "name": "text",
        "listing": {
          "closing_date": "text",
          "fees": [
            {
              "address": "text",
              "basis_points": 1,
              "type": "text"
            }
          ],
          "accept_price": 1,
          "start_price": 1,
          "current_price": 1,
          "name": "text",
          "token_address": "text",
          "token_id": "text",
          "chain": {
            "id": "text",
            "name": "text",
            "symbol": "text"
          }
        },
        "status": "text",
        "token_address": "text",
        "token_id": "text",
        "chain": {
          "id": "text",
          "name": "text",
          "symbol": "text"
        },
        "updated_at": "text",
        "owner": "text"
      }
    ]
  },
  "taker": "text",
  "price": 1,
  "start_time": "text",
  "end_time": "text"
}
  • Get a list of offers
  • GETGet list of offers
  • Get detail of a offer
  • GETGet detail of an offer
  • Create an offer
  • POSTCreate an offer
  • Accept an offer
  • POSTAccept an offer

Create an offer

post

Create an offer

Body
asset_idstringRequired

Asset ID of the asset to be offered

pricenumberRequired

Price of the asset

start_timestringRequired

Start time of this offer

end_timestringRequired

End time of this offer

Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
post
POST /v1/offers HTTP/1.1
Host: api.sandbox.horizonland.app
Content-Type: application/json
Accept: */*
Content-Length: 67

{
  "asset_id": "text",
  "price": 1,
  "start_time": "text",
  "end_time": "text"
}
{
  "assets": {
    "cursor": "text",
    "remaining": 1,
    "result": [
      {
        "collection": {
          "image_url": "text",
          "name": "text",
          "contract_address": "text"
        },
        "created_at": "text",
        "description": "text",
        "fees": [
          {
            "address": "text",
            "basis_points": 1,
            "type": "text"
          }
        ],
        "id": "text",
        "image_url": "text",
        "animation_url": "text",
        "external_link": "text",
        "metadata": {},
        "name": "text",
        "listing": {
          "closing_date": "text",
          "fees": [
            {
              "address": "text",
              "basis_points": 1,
              "type": "text"
            }
          ],
          "accept_price": 1,
          "start_price": 1,
          "current_price": 1,
          "name": "text",
          "token_address": "text",
          "token_id": "text",
          "chain": {
            "id": "text",
            "name": "text",
            "symbol": "text"
          }
        },
        "status": "text",
        "token_address": "text",
        "token_id": "text",
        "chain": {
          "id": "text",
          "name": "text",
          "symbol": "text"
        },
        "updated_at": "text",
        "owner": "text"
      }
    ]
  },
  "taker": "text",
  "price": 1,
  "start_time": "text",
  "end_time": "text"
}

Accept an offer

post

Accept an offer

Body
asset_idstringOptional

Offer ID of the offer to be accepted

Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
post
POST /v1/offers/accept HTTP/1.1
Host: api.sandbox.horizonland.app
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "asset_id": "text"
}
{
  "offer": {
    "assets": {
      "cursor": "text",
      "remaining": 1,
      "result": [
        {
          "collection": {
            "image_url": "text",
            "name": "text",
            "contract_address": "text"
          },
          "created_at": "text",
          "description": "text",
          "fees": [
            {
              "address": "text",
              "basis_points": 1,
              "type": "text"
            }
          ],
          "id": "text",
          "image_url": "text",
          "animation_url": "text",
          "external_link": "text",
          "metadata": {},
          "name": "text",
          "listing": {
            "closing_date": "text",
            "fees": [
              {
                "address": "text",
                "basis_points": 1,
                "type": "text"
              }
            ],
            "accept_price": 1,
            "start_price": 1,
            "current_price": 1,
            "name": "text",
            "token_address": "text",
            "token_id": "text",
            "chain": {
              "id": "text",
              "name": "text",
              "symbol": "text"
            }
          },
          "status": "text",
          "token_address": "text",
          "token_id": "text",
          "chain": {
            "id": "text",
            "name": "text",
            "symbol": "text"
          },
          "updated_at": "text",
          "owner": "text"
        }
      ]
    },
    "taker": "text",
    "price": 1,
    "start_time": "text",
    "end_time": "text"
  },
  "status": "text",
  "created_at": "text",
  "updated_at": "text"
}