Skip to content
parchmentdocs
Open app

Builder codes

Builder codes, ownership, status, on-top fees, and approvals

Builder fee approvals

get/accounts/{accountId}/builder-approvals

Path parameters

  • accountIdstringrequired

    Trading account object id

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

Responses

  • Builder fee approvals for the account; empty array when none.

    application/json

    • dataBuilderApproval[]required
      • accountIdstringrequired
        Pattern^0x[0-9a-f]{64}$
        Example0xad23e722f3542ae36c276c1b303e30ae77c840a84db89c7215fa87bf92006691
      • builderIdstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example7n
      • maxFeeBpsstringrequired

        Basis points (1/10000).

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

Example request

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

Example response (200)

application/json
{
  "data": [
    {
      "accountId": "0xad23e722f3542ae36c276c1b303e30ae77c840a84db89c7215fa87bf92006691",
      "builderId": "7n",
      "maxFeeBps": "8n"
    }
  ]
}

Builder owned by a wallet

get/accounts/{walletAddress}/builder

Path parameters

  • walletAddressstringrequired

    Wallet address

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

Responses

  • The wallet's builder object, or null. The same fields as the builder read.

    application/json

    • datanull | Builderrequired
      • activebooleanrequired
      • codestring | null
      • feeBpsstringrequired

        Basis points (1/10000).

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

        Builder id.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example7n
      • ownerstring | null
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • payoutstring | null
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • pendingstringrequired

        Builder cut parked for the payout address (base units).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n
      • revokeOpenbooleanrequired
      • selfServebooleanrequired
      • statusstringrequired
        One ofactivepausedsuspendedtombstoned
      • totalEarnedstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n

Example request

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

Example response (200)

application/json
{
  "data": {
    "active": true,
    "code": "string",
    "feeBps": "8n",
    "id": "7n",
    "owner": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
    "payout": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
    "pending": "100000000n",
    "revokeOpen": true,
    "selfServe": true,
    "status": "active",
    "totalEarned": "100000000n"
  }
}

Self-serve builder allowance

get/accounts/{walletAddress}/builder-allowance

Path parameters

  • walletAddressstringrequired

    Wallet address that creates self-serve codes

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

Responses

  • The wallet's self-serve allowance, counted like create_builder on chain: created live (not tombstoned) self-serve codes it registered, whoever owns them now (codes transferred to it do not count), limit (3) and remaining. n-suffixed decimal strings.

    application/json

    • dataBuilderAllowancerequired

      A wallet's self-serve builder allowance, counted like create_builder on chain: created live (not tombstoned) self-serve codes it registered, whoever owns them now (codes transferred to it do not count), limit and remaining.

      • createdstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example2n
      • limitstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example3n
      • remainingstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example1n

Example request

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

Example response (200)

application/json
{
  "data": {
    "created": "2n",
    "limit": "3n",
    "remaining": "1n"
  }
}

Builders controlled by a wallet

get/accounts/{walletAddress}/builders

Path parameters

  • walletAddressstringrequired

    Builder owner wallet address

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

Responses

  • Builders controlled by the wallet; empty array when none.

    application/json

    • dataBuilder[]required
      • activebooleanrequired
      • codestring | null
      • feeBpsstringrequired

        Basis points (1/10000).

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

        Builder id.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example7n
      • ownerstring | null
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • payoutstring | null
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • pendingstringrequired

        Builder cut parked for the payout address (base units).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n
      • revokeOpenbooleanrequired
      • selfServebooleanrequired
      • statusstringrequired
        One ofactivepausedsuspendedtombstoned
      • totalEarnedstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n

Example request

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

Example response (200)

application/json
{
  "data": [
    {
      "active": true,
      "code": "string",
      "feeBps": "8n",
      "id": "7n",
      "owner": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
      "payout": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
      "pending": "100000000n",
      "revokeOpen": true,
      "selfServe": true,
      "status": "active",
      "totalEarned": "100000000n"
    }
  ]
}

Builder by code

get/builders/{code}

Path parameters

  • codestringrequired

    Builder code

Responses

  • id, code, payout, owner, status, selfServe, feeBps, revokeOpen, active, pending, and totalEarned. id, feeBps, pending and totalEarned are n-suffixed decimal strings ("5000000n").

    application/json

    • dataBuilderrequired

      A registered builder.

      • activebooleanrequired
      • codestring | null
      • feeBpsstringrequired

        Basis points (1/10000).

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

        Builder id.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example7n
      • ownerstring | null
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • payoutstring | null
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • pendingstringrequired

        Builder cut parked for the payout address (base units).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n
      • revokeOpenbooleanrequired
      • selfServebooleanrequired
      • statusstringrequired
        One ofactivepausedsuspendedtombstoned
      • totalEarnedstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n

Example request

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

Example response (200)

application/json
{
  "data": {
    "active": true,
    "code": "string",
    "feeBps": "8n",
    "id": "7n",
    "owner": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
    "payout": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
    "pending": "100000000n",
    "revokeOpen": true,
    "selfServe": true,
    "status": "active",
    "totalEarned": "100000000n"
  }
}