Skip to content
parchmentdocs
Open app

Payout queue

FIFO payout queue length, instantly payable cash, and a wallet's rank

Wallet queue position

get/accounts/{walletAddress}/queue

Path parameters

  • walletAddressstringrequired

    Wallet address

    Pattern^(0[xX])?[0-9a-fA-F]{1,64}$
    Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d

Responses

  • Whether the wallet has a queued claim, its net, and its FIFO rank; its claims (at most 200) with position, owed and owedAhead; and the queue length, total owed and LP cash (null until the exchange is indexed).

    application/json

    • dataAccountQueuerequired

      A wallet's place in the payout queue, with its disclosure fields.

      Wins the LP cannot pay at once wait in the FIFO payout queue (there is no pool-equity OI cap).

      • claimsQueueClaim[]required

        The wallet's queued claims in FIFO order, at most 200.

      • hasClaimbooleanrequired

        Whether the wallet has a queued claim.

      • lpCashstring | null

        The exchange's lp_cash (base units); null while the exchange is unindexed.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n
      • netstringrequired

        Sum of the nets still owed to the wallet on its queued claims (base units).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n
      • ownerstringrequired
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • queueLengthstringrequired

        Queued claims overall.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example24n
      • rankstring | null

        1-based FIFO place of the wallet's first queued claim; null without one.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example17n
      • totalOwedstringrequired

        The exchange's total_owed (base units; the sum of the queued nets until indexed).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n

Example request

curl 'https://api.parchment.trade/accounts/0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d/queue'
const res = await fetch("https://api.parchment.trade/accounts/0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d/queue");
const { data } = await res.json();

Example response (200)

application/json
{
  "data": {
    "claims": [
      {
        "claimId": "5531n",
        "owed": "100000000n",
        "owedAhead": "100000000n",
        "position": "17n"
      }
    ],
    "hasClaim": true,
    "lpCash": "1850000000000n",
    "net": "100000000n",
    "owner": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
    "queueLength": "24n",
    "rank": "17n",
    "totalOwed": "1850000000000n"
  }
}

Payout queue

get/queue

Responses

  • Queue length, total owed, LP cash, the instantly payable amount, and owedToLpCashBps (null without LP cash).

    application/json

    • dataQueueSummaryrequired
      • instantlyPayablestring | null

        Portion of total_owed payable now (base units, at most lp_cash); null without lp_cash.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n
      • lengthstringrequired

        Number of queued claims.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example24n
      • lpCashstring | null

        LP cash (base units); null while the exchange is unindexed.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n
      • owedToLpCashBpsstring | null

        floor(totalOwed * 10000 / lpCash); 10000 = owed equals cash. null when lp_cash is unknown or 0.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example3100n
      • totalOwedstringrequired

        Sum of queued claims (base units).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n

Example request

curl 'https://api.parchment.trade/queue'
const res = await fetch("https://api.parchment.trade/queue");
const { data } = await res.json();

Example response (200)

application/json
{
  "data": {
    "instantlyPayable": "1850000000000n",
    "length": "24n",
    "lpCash": "1850000000000n",
    "owedToLpCashBps": "3100n",
    "totalOwed": "1850000000000n"
  }
}