Skip to content
Get started

Get NEPT token state

nept.get_state(NeptGetStateParams**kwargs) -> NeptGetStateResponse
GET/api/v1/nept/state

Get NEPT token state

ParametersExpand Collapse
with_text: Optional[bool]

Include text variation fields

with_value: Optional[bool]

Calculate and include USD values for amounts, where applicable

ReturnsExpand Collapse
class NeptGetStateResponse:
data: NeptState
extra: Extra
text: Optional[ExtraText]

Human-readable field variants. Will not be null when query param with_text is true.

total_claimed: str
total_issued: str
total_locked: str
total_supply: str
value: Optional[ExtraValue]

USD values for the corresponding amounts above. Will not be null when query param with_value is true.

Note

This variant group contains an additional price field (set to the number used in value calculation).

The embedded text group will contain the text variant if with_text was specified as well.

extra: ExtraValueExtra
text: Optional[ExtraValueExtraText]

Human-readable variants of USD values. Will not be null when query params with_text and with_value are true.

price: str

Text representation of price

total_claimed: str
total_issued: str
total_locked: str
total_supply: str
price: str

Price used in value calculations

total_claimed: str
total_issued: str
total_locked: str
total_supply: str
staking: List[Staking]

Staking pools (current pool state is included)

duration: int

The lockup duration for this pool in seconds

formatuint64
minimum0
extra: StakingExtra
text: Optional[StakingExtraText]

Human-readable field variants. Will not be null when query param with_text is true.

duration: str
index: str
index: int

The ordered index (position) of this pool

formatuint8
minimum0
maximum255

Current contract state of staking pool

extra: Extra
text: Optional[ExtraText]

Human-readable field variants. Will not be null when query param with_text is true.

total_bonded: str
value: Optional[ExtraValue]

USD values for the corresponding amounts above. Will not be null when query param with_value is true.

Note

This variant group contains an additional price field (set to the number used in value calculation).

The embedded text group will contain the text variant if with_text was specified as well.

extra: ExtraValueExtra
text: Optional[ExtraValueExtraText]

Human-readable variants of USD values. Will not be null when query params with_text and with_value are true.

price: str

Text representation of price

total_bonded: str
price: str

Price used in value calculations

total_bonded: str
total_bonded: str

The total amount staked to this pool

total_claimed: str

Total amount of NEPT claimed, either locked or unlocked

Includes initial balances and claimed rewards but not unclaimed rewards

total_issued: str

Total amount of NEPT issued, either locked or unlocked

Includes initial balances and all claimed or claimable rewards

total_locked: str

Total amount of NEPT locked

Inlcudes unlocks which have not yet been claimed

total_supply: str

Total supply of NEPT

Includes locked and unissued tokens

error: None

Error data. Guaranteed null for successful response.

status: int

HTTP status. Successful responses are guaranteed to be < 400. Conversely, error responses are guaranteed to be >= 400.

formatuint16
minimum0
maximum65535
status_text: str

HTTP status text

Get NEPT token state

from neptune_api_v2 import NeptuneAPIV2

client = NeptuneAPIV2()
response = client.nept.get_state()
print(response.data)
{
  "data": {
    "total_issued": "3959490356",
    "total_claimed": "4001000382",
    "total_locked": "7241108121",
    "total_supply": "51464522",
    "staking": [
      {
        "index": 0,
        "duration": 604800,
        "extra": {
          "text": {
            "duration": "7 days",
            "index": "1"
          }
        },
        "state": {
          "total_bonded": "0",
          "extra": {
            "text": {
              "total_bonded": "0.00000 NEPT"
            },
            "value": {
              "total_bonded": "0",
              "price": "0.032585758453916404",
              "extra": {
                "text": {
                  "price": "$0.03",
                  "total_bonded": "$0.00"
                }
              }
            }
          }
        }
      },
      {
        "index": 1,
        "duration": 2592000,
        "extra": {
          "text": {
            "duration": "30 days",
            "index": "2"
          }
        },
        "state": {
          "total_bonded": "0",
          "extra": {
            "text": {
              "total_bonded": "0.00000 NEPT"
            },
            "value": {
              "total_bonded": "0",
              "price": "0.032585758453916404",
              "extra": {
                "text": {
                  "price": "$0.03",
                  "total_bonded": "$0.00"
                }
              }
            }
          }
        }
      },
      {
        "index": 2,
        "duration": 7776000,
        "extra": {
          "text": {
            "duration": "90 days",
            "index": "3"
          }
        },
        "state": {
          "total_bonded": "0",
          "extra": {
            "text": {
              "total_bonded": "0.00000 NEPT"
            },
            "value": {
              "total_bonded": "0",
              "price": "0.032585758453916404",
              "extra": {
                "text": {
                  "price": "$0.03",
                  "total_bonded": "$0.00"
                }
              }
            }
          }
        }
      }
    ],
    "extra": {
      "text": {
        "total_claimed": "4,001.00038 NEPT",
        "total_supply": "51.46452 NEPT",
        "total_locked": "7,241.10812 NEPT",
        "total_issued": "3,959.49035 NEPT"
      },
      "value": {
        "total_claimed": "130.3756320218792618",
        "total_issued": "129.022996341227472068",
        "total_locked": "235.957000169598477259",
        "total_supply": "1.677010482838266759",
        "price": "0.032585758453916404",
        "extra": {
          "text": {
            "price": "$0.03",
            "total_issued": "$129.02",
            "total_locked": "$235.95",
            "total_claimed": "$130.37",
            "total_supply": "$1.67"
          }
        }
      }
    }
  },
  "error": null,
  "status": 200,
  "status_text": "200 OK"
}
{
  "data": null,
  "error": {
    "kind": "internal",
    "scope": "server",
    "message": "An unexpected error occurred"
  },
  "status": 500,
  "status_text": "500 Internal Server Error"
}
Returns Examples
{
  "data": {
    "total_issued": "3959490356",
    "total_claimed": "4001000382",
    "total_locked": "7241108121",
    "total_supply": "51464522",
    "staking": [
      {
        "index": 0,
        "duration": 604800,
        "extra": {
          "text": {
            "duration": "7 days",
            "index": "1"
          }
        },
        "state": {
          "total_bonded": "0",
          "extra": {
            "text": {
              "total_bonded": "0.00000 NEPT"
            },
            "value": {
              "total_bonded": "0",
              "price": "0.032585758453916404",
              "extra": {
                "text": {
                  "price": "$0.03",
                  "total_bonded": "$0.00"
                }
              }
            }
          }
        }
      },
      {
        "index": 1,
        "duration": 2592000,
        "extra": {
          "text": {
            "duration": "30 days",
            "index": "2"
          }
        },
        "state": {
          "total_bonded": "0",
          "extra": {
            "text": {
              "total_bonded": "0.00000 NEPT"
            },
            "value": {
              "total_bonded": "0",
              "price": "0.032585758453916404",
              "extra": {
                "text": {
                  "price": "$0.03",
                  "total_bonded": "$0.00"
                }
              }
            }
          }
        }
      },
      {
        "index": 2,
        "duration": 7776000,
        "extra": {
          "text": {
            "duration": "90 days",
            "index": "3"
          }
        },
        "state": {
          "total_bonded": "0",
          "extra": {
            "text": {
              "total_bonded": "0.00000 NEPT"
            },
            "value": {
              "total_bonded": "0",
              "price": "0.032585758453916404",
              "extra": {
                "text": {
                  "price": "$0.03",
                  "total_bonded": "$0.00"
                }
              }
            }
          }
        }
      }
    ],
    "extra": {
      "text": {
        "total_claimed": "4,001.00038 NEPT",
        "total_supply": "51.46452 NEPT",
        "total_locked": "7,241.10812 NEPT",
        "total_issued": "3,959.49035 NEPT"
      },
      "value": {
        "total_claimed": "130.3756320218792618",
        "total_issued": "129.022996341227472068",
        "total_locked": "235.957000169598477259",
        "total_supply": "1.677010482838266759",
        "price": "0.032585758453916404",
        "extra": {
          "text": {
            "price": "$0.03",
            "total_issued": "$129.02",
            "total_locked": "$235.95",
            "total_claimed": "$130.37",
            "total_supply": "$1.67"
          }
        }
      }
    }
  },
  "error": null,
  "status": 200,
  "status_text": "200 OK"
}
{
  "data": null,
  "error": {
    "kind": "internal",
    "scope": "server",
    "message": "An unexpected error occurred"
  },
  "status": 500,
  "status_text": "500 Internal Server Error"
}