Pyth Network action reference
This page is generated from the plugin registry. Do not edit it by hand.
Pyth Network: cross-chain decentralized on-chain price oracle feeds
Set actionType in a node’s config to the action type shown under each heading. See the workflow definition page for the node format.
Read actions return the value under result: a single unnamed output is result, a named one is result.<name>, and several outputs are result.<name> each. Reference it as {{@nodeId:Label.result}}. Integer Solidity types are passed as decimal strings.
| Action | Action type |
|---|---|
| Pyth Network: Get Price (Unsafe) | pyth/get-price-unsafe |
| Pyth Network: Get Price | pyth/get-price |
| Pyth Network: Get Price No Older Than | pyth/get-price-no-older-than |
| Pyth Network: Get EMA Price (Unsafe) | pyth/get-ema-price-unsafe |
| Pyth Network: Get EMA Price | pyth/get-ema-price |
| Pyth Network: Get EMA Price No Older Than | pyth/get-ema-price-no-older-than |
| Pyth Network: Get Price Unsafe (Custom Oracle) | pyth/custom-get-price-unsafe |
| Pyth Network: Get Price (Custom Oracle) | pyth/custom-get-price |
| Pyth Network: Get Price No Older Than (Custom Oracle) | pyth/custom-get-price-no-older-than |
| Pyth Network: Get EMA Price Unsafe (Custom Oracle) | pyth/custom-get-ema-price-unsafe |
| Pyth Network: Get EMA Price (Custom Oracle) | pyth/custom-get-ema-price |
| Pyth Network: Get EMA Price No Older Than (Custom Oracle) | pyth/custom-get-ema-price-no-older-than |
Pyth Network: Get Price (Unsafe)
Action type: pyth/get-price-unsafe. Connection: not required.
Read the last pushed on-chain price of any age (check publishTime for freshness).
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get Price
Action type: pyth/get-price. Connection: not required.
Read the current price tuple for a Pyth price feed. Reverts with StalePrice() if not recently updated.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get Price No Older Than
Action type: pyth/get-price-no-older-than. Connection: not required.
Read the current price tuple for a Pyth price feed, reverting if older than specified max age.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). | ||
age | uint256 | Yes | Max Age (seconds) (uint256). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get EMA Price (Unsafe)
Action type: pyth/get-ema-price-unsafe. Connection: not required.
Read the last pushed on-chain EMA price of any age (check publishTime for freshness).
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get EMA Price
Action type: pyth/get-ema-price. Connection: not required.
Read the current exponential moving average (EMA) price tuple from the on-chain Pyth contract.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get EMA Price No Older Than
Action type: pyth/get-ema-price-no-older-than. Connection: not required.
Read the current EMA price tuple from the Pyth contract, reverting if older than max age.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). | ||
age | uint256 | Yes | Max Age (seconds) (uint256). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get Price Unsafe (Custom Oracle)
Action type: pyth/custom-get-price-unsafe. Connection: not required.
Read the last pushed on-chain price of any age from a custom Pyth oracle address.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
contractAddress | string | Yes | Custom Pyth Oracle Address. | ||
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get Price (Custom Oracle)
Action type: pyth/custom-get-price. Connection: not required.
Read current price tuple from a custom Pyth oracle contract address.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
contractAddress | string | Yes | Custom Pyth Oracle Address. | ||
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get Price No Older Than (Custom Oracle)
Action type: pyth/custom-get-price-no-older-than. Connection: not required.
Read price tuple from a custom Pyth oracle address with max age assertion.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
contractAddress | string | Yes | Custom Pyth Oracle Address. | ||
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). | ||
age | uint256 | Yes | Max Age (seconds) (uint256). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get EMA Price Unsafe (Custom Oracle)
Action type: pyth/custom-get-ema-price-unsafe. Connection: not required.
Read the last pushed on-chain EMA price of any age from a custom Pyth oracle address.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
contractAddress | string | Yes | Custom Pyth Oracle Address. | ||
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get EMA Price (Custom Oracle)
Action type: pyth/custom-get-ema-price. Connection: not required.
Read EMA price tuple from a custom Pyth oracle contract address.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
contractAddress | string | Yes | Custom Pyth Oracle Address. | ||
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Pyth Network: Get EMA Price No Older Than (Custom Oracle)
Action type: pyth/custom-get-ema-price-no-older-than. Connection: not required.
Read EMA price tuple from a custom Pyth oracle address with max age assertion.
Inputs
| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
network | string | Yes | chain ids 1, 56, 137, 999, 8453, 42161, 43114, 11155111 | Network. | |
contractAddress | string | Yes | Custom Pyth Oracle Address. | ||
id | bytes32 | Yes | Price Feed ID (bytes32 hex) (bytes32). | ||
age | uint256 | Yes | Max Age (seconds) (uint256). |
Outputs
| Output | Description |
|---|---|
result | The contract function return value |
result.price | Price (int64 raw integer, scaled by 10^expo e.g. 190533915588 with expo -8 is $1905.34) |
result.conf | Confidence Interval (uint64) |
result.expo | Exponent (int32) |
result.publishTime | Publish Time (Unix timestamp) |
success | Whether the operation succeeded |
error | Error message if the operation failed |
Contracts
| Contract | Chain ids |
|---|---|
| Pyth Oracle Contract | 1, 56, 137, 999, 8453, 42161, 43114, 11155111 |
| Custom Pyth Oracle | any (the address is set on the node) |