Skip to content
Get started

Get market params

GET/api/v1/markets/config

Get market params

Query ParametersExpand Collapse
with_text: optional boolean

Include text variation fields

ReturnsExpand Collapse
data: GlobalMarketConfig { dynamic_discount_width, extra, flash_loan_fee, 10 more }
dynamic_discount_width: string

The required change in account health below 1.0 to achieve the maximum discount. should be ~= 0.02 must be <= 1.0

extra: object { text }
text: object { flash_loan_fee, liquidation_fee, stake_collateral_ratio, 3 more }

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

flash_loan_fee: string
liquidation_fee: string
stake_collateral_ratio: string
stake_flash_loan_ratio: string
staking_health_modifier: string
time_window_nanos: string
flash_loan_fee: string

The coefficient used to calculate the flash loan fee. should be ~= 0.01 must be <= 1.0

flash_loans_enabled: boolean

Whether flash loans are enabled or not

hinj: AssetSpec { id, group, group_key }

Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc)

id: string
group: "native" or "token"
One of the following:
"native"
"token"
group_key: string
liquidation_fee: string

The coefficient use to calculate the liquidation protocol fee. should be ~= 0.01 must be <= 1.0

nept: AssetSpec { id, group, group_key }

Provides a unique identifier for an asset for use throughout the Neptune API. IDs are unique across asset domains (contract tokens, native denoms, etc)

id: string
group: "native" or "token"
One of the following:
"native"
"token"
group_key: string
partial_liquidation_threshold: string

Minimum account value to avoid complete liquidation.

stake_collateral_ratio: string

The required ratio of weighted staked NEPT to collateral value to obtain the maximum staking health modifier. should be ~= 0.1 must be <= 1.0

stake_flash_loan_ratio: string

The required ratio of weighted staked NEPT to flash loan value should be ~= 0.05 must be <= 1.0

staking_health_modifier: string

The maximum health increase provided by staking. should be ~= 0.05 and must be <= 1.0

target_liquidation_health: string

The account health target for a liquidation. should be ~= 1.02 must be >= 1.0

time_window_nanos: number

Number of nanoseconds that an oracle price is valid for.

formatuint64
minimum0
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.

formatuint16
minimum0
maximum65535
status_text: string

HTTP status text

Get market params

curl https://api-v2.nept.finance/api/v1/markets/config
{
  "data": {
    "time_window_nanos": 3600000000000,
    "partial_liquidation_threshold": "1000000000000000000000",
    "target_liquidation_health": "1.03",
    "liquidation_fee": "0",
    "flash_loans_enabled": true,
    "flash_loan_fee": "0",
    "staking_health_modifier": "0.03",
    "stake_collateral_ratio": "0.1",
    "stake_flash_loan_ratio": "0.1",
    "dynamic_discount_width": "0.01",
    "hinj": {
      "id": "token;inj18luqttqyckgpddndh8hvaq25d5nfwjc78m56lc",
      "group": "token",
      "group_key": "inj18luqttqyckgpddndh8hvaq25d5nfwjc78m56lc"
    },
    "nept": {
      "id": "native;factory/inj1v3a4zznudwpukpr8y987pu5gnh4xuf7v36jhva/nept",
      "group": "native",
      "group_key": "factory/inj1v3a4zznudwpukpr8y987pu5gnh4xuf7v36jhva/nept"
    },
    "extra": {
      "text": {
        "time_window_nanos": "1 hour",
        "flash_loan_fee": "0%",
        "staking_health_modifier": "3%",
        "stake_flash_loan_ratio": "10%",
        "stake_collateral_ratio": "10%",
        "liquidation_fee": "0%"
      }
    }
  },
  "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": {
    "time_window_nanos": 3600000000000,
    "partial_liquidation_threshold": "1000000000000000000000",
    "target_liquidation_health": "1.03",
    "liquidation_fee": "0",
    "flash_loans_enabled": true,
    "flash_loan_fee": "0",
    "staking_health_modifier": "0.03",
    "stake_collateral_ratio": "0.1",
    "stake_flash_loan_ratio": "0.1",
    "dynamic_discount_width": "0.01",
    "hinj": {
      "id": "token;inj18luqttqyckgpddndh8hvaq25d5nfwjc78m56lc",
      "group": "token",
      "group_key": "inj18luqttqyckgpddndh8hvaq25d5nfwjc78m56lc"
    },
    "nept": {
      "id": "native;factory/inj1v3a4zznudwpukpr8y987pu5gnh4xuf7v36jhva/nept",
      "group": "native",
      "group_key": "factory/inj1v3a4zznudwpukpr8y987pu5gnh4xuf7v36jhva/nept"
    },
    "extra": {
      "text": {
        "time_window_nanos": "1 hour",
        "flash_loan_fee": "0%",
        "staking_health_modifier": "3%",
        "stake_flash_loan_ratio": "10%",
        "stake_collateral_ratio": "10%",
        "liquidation_fee": "0%"
      }
    }
  },
  "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"
}