Artion GraphQL API
  • Getting Started
  • Installation
  • Quickstart
  • GraphQL Schema Basics
  • GraphQL Schema
    • Schema Definition
    • Auxiliary Structures
    • Activity
    • Auction Trade
    • Banned NFT
    • Collection
    • Event
    • Follow
    • Listing Trade
    • Notification Settings
    • Offer Trade
    • Ownership
    • Random Trade
    • Shipping on Redeem
    • Token
    • Like
    • User
Powered by GitBook
On this page
  1. GraphQL Schema

Random Trade

A special type of random trading can be deployed on Artion. It allows a trader to populate the trading contract with set of pre-minted NFT tokens. Buyers place their offers on the contract and each offer receives a random NFT from the set until all the NFT-s are sold.

# RandomTrade represents an NFT trade with random tokens purchase.
type RandomTrade {
    # address of the trade contract
    contract: Address!

    # name of the trade
    name: String!

    # the time stamp of the start of the trade
    tradeStarts: Time!

    # the time stamp of the end of the trade
    tradeEnds: Time!

    # number of tokens available to be traded
    tokensAvailable: BigInt!

    # total number of tokens in the trading pool including already reserved
    totalTokens: BigInt!

    # list of pay tokens allowed by the trade
    payTokens: [Address!]!

    # price of a random token traded in the given pay token denomination
    price(token:Address!): BigInt!
}
PreviousOwnershipNextShipping on Redeem

Last updated 3 years ago