## Get NEPT token state `client.nept.getState(NeptGetStateParamsquery?, RequestOptionsoptions?): NeptGetStateResponse` **get** `/api/v1/nept/state` Get NEPT token state ### Parameters - `query: NeptGetStateParams` - `with_text?: boolean` Include text variation fields - `with_value?: boolean` Calculate and include USD values for amounts, where applicable ### Returns - `NeptGetStateResponse` - `data: NeptState` - `extra: Extra` - `text: Text | null` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_claimed: string` - `total_issued: string` - `total_locked: string` - `total_supply: string` - `value: Value | null` 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: Extra` - `text: Text | null` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_claimed: string` - `total_issued: string` - `total_locked: string` - `total_supply: string` - `price: string` Price used in value calculations - `total_claimed: string` - `total_issued: string` - `total_locked: string` - `total_supply: string` - `staking: Array` Staking pools (current pool state is included) - `duration: number` The lockup duration for this pool in seconds - `extra: Extra` - `text: Text | null` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `duration: string` - `index: string` - `index: number` The ordered index (position) of this pool - `state: StakingPoolState` Current contract state of staking pool - `extra: Extra` - `text: Text | null` Human-readable field variants. Will not be null when query param `with_text` is `true`. - `total_bonded: string` - `value: Value | null` 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: Extra` - `text: Text | null` Human-readable variants of USD values. Will not be null when query params `with_text` and `with_value` are `true`. - `price: string` Text representation of price - `total_bonded: string` - `price: string` Price used in value calculations - `total_bonded: string` - `total_bonded: string` The total amount staked to this pool - `total_claimed: string` Total amount of NEPT claimed, either locked or unlocked Includes initial balances and claimed rewards but not unclaimed rewards - `total_issued: string` Total amount of NEPT issued, either locked or unlocked Includes initial balances and all claimed or claimable rewards - `total_locked: string` Total amount of NEPT locked Inlcudes unlocks which have not yet been claimed - `total_supply: string` Total supply of NEPT Includes locked and unissued tokens - `error: unknown` Error data. Guaranteed `null` for successful response. - `status: number` HTTP status. Successful responses are guaranteed to be < `400`. Conversely, error responses are guaranteed to be >= `400`. - `status_text: string` HTTP status text ### Example ```typescript import NeptuneAPIV2 from '@neptunefinance/api-v2'; const client = new NeptuneAPIV2(); const response = await client.nept.getState(); console.log(response.data); ``` #### Response ```json { "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" } ```