> For the complete documentation index, see [llms.txt](https://docs.v2.pod.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.v2.pod.network/guides-references/references/json-rpc/ethereum-interface-eth.md).

# Ethereum Interface (eth )

Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer that allows existing wallets, tools, and libraries to interact with Pod using familiar methods and conventions. It is designed to be drop-in compatible with standard Ethereum client workflows, allowing developers to use common tooling such as `ethers.js`, `alloy.rs`, and `cast` without modification.

The interface covers the transaction submission and receipt lifecycle, including balance and nonce discovery, read-only contract calls, log queries, and real-time subscriptions.

📝 This is a JSON-RPC 2.0 API. The request path is not important; the method to execute is defined by the method field in the request body. You can send all requests to /, and any path after / is optional and used only for documentation clarity.

&#x20;   &#x20;

## Get Native Token Balance

> Returns the native token balance for the specified address in the wallet.\
> \
> \*\*Note:\*\* This returns the wallet balance, which is distinct from the orderbook contract balance.\
> To query the balance deposited in the orderbook contract, call the \`getBalance\` function on the orderbook contract.\
> \
> The \`block\_number\` parameter is accepted for Ethereum compatibility but is ignored.<br>

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_getBalance":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Get Native Token Balance","operationId":"eth_getBalance","description":"Returns the native token balance for the specified address in the wallet.\n\n**Note:** This returns the wallet balance, which is distinct from the orderbook contract balance.\nTo query the balance deposited in the orderbook contract, call the `getBalance` function on the orderbook contract.\n\nThe `block_number` parameter is accepted for Ethereum compatibility but is ignored.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_getBalance"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `address` (address): The address to check balance for\n2. `block_number` (string): Block identifier (accepted but ignored)\n","items":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"string","default":"latest"}]}}}}}}},"responses":{"200":{"description":"Balance in wei (hex-encoded uint256)","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"$ref":"#/components/schemas/HexUint256"},"id":{"type":"integer"}}}}}}}}}},"components":{"schemas":{"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum address (20 bytes, hex-encoded with 0x prefix)"},"HexUint256":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"Unsigned 256-bit integer (hex-encoded with 0x prefix)"}}}}
```

## Get Chain ID

> Returns the chain ID used for signing transactions (EIP-155).

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_chainId":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Get Chain ID","operationId":"eth_chainId","description":"Returns the chain ID used for signing transactions (EIP-155).","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_chainId"},"id":{"type":"integer","default":1},"params":{"type":"array","default":[]}}}}}},"responses":{"200":{"description":"Chain ID (hex-encoded)","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"type":"string"},"id":{"type":"integer"}}}}}}}}}}}
```

## Get Transaction by Hash

> Returns the transaction that matches the given hash, or null if not found.<br>

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_getTransactionByHash":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Get Transaction by Hash","operationId":"eth_getTransactionByHash","description":"Returns the transaction that matches the given hash, or null if not found.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_getTransactionByHash"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `transaction_hash` (bytes32): The transaction hash to look up\n","items":{"$ref":"#/components/schemas/Bytes32"}}}}}}},"responses":{"200":{"description":"Transaction object, or `null` if not found.","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"$ref":"#/components/schemas/Transaction"},"id":{"type":"integer"}}}}}}}}}},"components":{"schemas":{"Bytes32":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"32-byte value (hex-encoded with 0x prefix). Used for transaction hashes, orderbook IDs, etc."},"Transaction":{"type":"object","description":"Transaction object returned by eth_getTransactionByHash","properties":{"hash":{"$ref":"#/components/schemas/Bytes32"},"nonce":{"type":"string"},"blockHash":{"$ref":"#/components/schemas/Bytes32","nullable":true},"blockNumber":{"type":"string","nullable":true},"transactionIndex":{"type":"string","nullable":true},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address","nullable":true},"value":{"$ref":"#/components/schemas/HexUint256"},"gas":{"type":"string"},"gasPrice":{"type":"string"},"input":{"type":"string"},"v":{"type":"string"},"r":{"type":"string"},"s":{"type":"string"}}},"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum address (20 bytes, hex-encoded with 0x prefix)"},"HexUint256":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"Unsigned 256-bit integer (hex-encoded with 0x prefix)"}}}}
```

## Get Transaction Count (Nonce)

> Returns the transaction count (nonce) for the specified address.\
> Required for transaction signing to prevent replay attacks.\
> The nonce is the current transaction count for the address.\
> \
> \*\*Pod-specific:\*\* The \`block\_tag\` parameter is accepted for Ethereum compatibility but is ignored.<br>

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_getTransactionCount":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Get Transaction Count (Nonce)","operationId":"eth_getTransactionCount","description":"Returns the transaction count (nonce) for the specified address.\nRequired for transaction signing to prevent replay attacks.\nThe nonce is the current transaction count for the address.\n\n**Pod-specific:** The `block_tag` parameter is accepted for Ethereum compatibility but is ignored.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_getTransactionCount"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `address` (address): The address to get nonce for\n2. `block_tag` (string): Block tag (accepted but ignored)\n"}}}}}},"responses":{"200":{"description":"Nonce (hex-encoded uint256)","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"$ref":"#/components/schemas/HexUint256"},"id":{"type":"integer"}}}}}}}}}},"components":{"schemas":{"HexUint256":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"Unsigned 256-bit integer (hex-encoded with 0x prefix)"}}}}
```

## Send Raw Transaction (Fire-and-Forget)

> Submits a signed EIP-1559 transaction to the network. Returns the transaction hash on success.\
> \
> The transaction must be RLP-encoded and signed. Use this method to submit orderbook operations\
> (deposits, withdrawals, order submissions, cancellations) to the orderbook contract.\
> \
> For synchronous attestation feedback (successes/errors from validators), use \`pod\_sendRawTransaction\`.<br>

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_sendRawTransaction":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Send Raw Transaction (Fire-and-Forget)","operationId":"eth_sendRawTransaction","description":"Submits a signed EIP-1559 transaction to the network. Returns the transaction hash on success.\n\nThe transaction must be RLP-encoded and signed. Use this method to submit orderbook operations\n(deposits, withdrawals, order submissions, cancellations) to the orderbook contract.\n\nFor synchronous attestation feedback (successes/errors from validators), use `pod_sendRawTransaction`.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_sendRawTransaction"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `signed_tx` (string): Signed RLP-encoded transaction data\n","items":{"type":"string","description":"Signed RLP-encoded transaction"}}}}}}},"responses":{"200":{"description":"Transaction hash","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"$ref":"#/components/schemas/Bytes32"},"id":{"type":"integer"}}}}}}}}}},"components":{"schemas":{"Bytes32":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"32-byte value (hex-encoded with 0x prefix). Used for transaction hashes, orderbook IDs, etc."}}}}
```

## Execute Read-Only Call

> Executes a new message call immediately without creating a transaction on the blockchain.\
> \
> Use this method for read-only operations on the orderbook contract, such as:\
> \- \`getBalance(address token)\` - Get deposited balance for a token\
> \- \`getOrders(bytes32 orderbookId, bytes32\[] txHashes)\` - Get order details by transaction hashes\
> \
> \*\*Orderbook Contract Address:\*\* \`0x50d0000000000000000000000000000000000002\`<br>

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_call":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Execute Read-Only Call","operationId":"eth_call","description":"Executes a new message call immediately without creating a transaction on the blockchain.\n\nUse this method for read-only operations on the orderbook contract, such as:\n- `getBalance(address token)` - Get deposited balance for a token\n- `getOrders(bytes32 orderbookId, bytes32[] txHashes)` - Get order details by transaction hashes\n\n**Orderbook Contract Address:** `0x50d0000000000000000000000000000000000002`\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_call"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `transaction` (object): Call object with `to`, `data`, and optionally `from`\n2. `block_tag` (string): Block tag (e.g., \"latest\")\n"}}}}}},"responses":{"200":{"description":"Return data (hex-encoded)","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"type":"string"},"id":{"type":"integer"}}}}}}}}}}}
```

## Get Transaction Receipt

> Retrieves the transaction receipt including execution status and event logs.\
> \
> \*\*Pod-specific:\*\* The receipt includes \`pod\_metadata\` containing validator attestations for transaction finality verification.\
> \
> Returns \`null\` if the transaction is not found or not yet processed.<br>

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_getTransactionReceipt":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Get Transaction Receipt","operationId":"eth_getTransactionReceipt","description":"Retrieves the transaction receipt including execution status and event logs.\n\n**Pod-specific:** The receipt includes `pod_metadata` containing validator attestations for transaction finality verification.\n\nReturns `null` if the transaction is not found or not yet processed.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_getTransactionReceipt"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `transaction_hash` (bytes32): The transaction hash to look up\n","items":{"$ref":"#/components/schemas/Bytes32"}}}}}}},"responses":{"200":{"description":"Transaction receipt with Pod-specific attestation data, or `null` if not found.","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"$ref":"#/components/schemas/TransactionReceipt"},"id":{"type":"integer"}}}}}}}}}},"components":{"schemas":{"Bytes32":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"32-byte value (hex-encoded with 0x prefix). Used for transaction hashes, orderbook IDs, etc."},"TransactionReceipt":{"type":"object","description":"Transaction receipt with execution status, logs, and Pod-specific metadata","properties":{"type":{"type":"string","description":"Transaction type (EIP-2718)"},"status":{"type":"string","enum":["0x0","0x1"],"description":"Execution status - \"0x1\" for success, \"0x0\" for failure"},"cumulativeGasUsed":{"$ref":"#/components/schemas/HexUint256"},"logs":{"type":"array","items":{"$ref":"#/components/schemas/Log"}},"logsBloom":{"type":"string","description":"Bloom filter for logs (hex-encoded)"},"transactionHash":{"$ref":"#/components/schemas/Bytes32"},"transactionIndex":{"type":"string","description":"Transaction index in block (hex-encoded)"},"blockHash":{"$ref":"#/components/schemas/Bytes32"},"blockNumber":{"type":"string","description":"Block number (hex-encoded)"},"gasUsed":{"$ref":"#/components/schemas/HexUint256"},"effectiveGasPrice":{"$ref":"#/components/schemas/HexUint256"},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address"},"contractAddress":{"type":"string","nullable":true,"description":"Contract address if this was a contract creation (null otherwise)"},"pod_metadata":{"$ref":"#/components/schemas/PodMetadata","description":"Pod-specific attestation data for transaction finality verification"}}},"HexUint256":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"Unsigned 256-bit integer (hex-encoded with 0x prefix)"},"Log":{"type":"object","description":"Event log emitted during transaction execution","properties":{"address":{"$ref":"#/components/schemas/Address","description":"Address of the contract that emitted the log"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/Bytes32"},"description":"Indexed event parameters"},"data":{"type":"string","description":"Non-indexed event data (hex-encoded)"}}},"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum address (20 bytes, hex-encoded with 0x prefix)"},"PodMetadata":{"type":"object","description":"Pod-specific metadata containing validator attestations for finality verification","properties":{"attestations":{"type":"array","items":{"$ref":"#/components/schemas/PodAttestation"},"description":"List of validator attestations for the transaction"},"committee_epoch":{"type":"integer","format":"int64","description":"The committee epoch during which the transaction was attested"}}},"PodAttestation":{"type":"object","description":"Validator attestation for a transaction","properties":{"validator_address":{"$ref":"#/components/schemas/Address","description":"Address of the attesting validator"},"sequence_number":{"type":"integer","format":"int64","description":"Sequence number of the attestation"},"batch_index":{"type":"integer","description":"Index within the attestation batch"},"timestamp":{"$ref":"#/components/schemas/Timestamp","description":"Timestamp when the attestation was created (microseconds)"},"signature":{"type":"string","description":"Hex-encoded secp256k1 ECDSA signature"}}},"Timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in microseconds (not milliseconds or seconds)"}}}}
```

## Estimate Gas

> Estimates the gas required for a transaction.\
> \
> \*\*Pod-specific behavior:\*\* If the transaction already specifies a gas value, returns that value.\
> Otherwise, returns \`21000\` (standard transaction gas).<br>

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_estimateGas":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Estimate Gas","operationId":"eth_estimateGas","description":"Estimates the gas required for a transaction.\n\n**Pod-specific behavior:** If the transaction already specifies a gas value, returns that value.\nOtherwise, returns `21000` (standard transaction gas).\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_estimateGas"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `transaction` (object): Transaction object with `to`, `data`, `value`, `from`, etc.\n"}}}}}},"responses":{"200":{"description":"Estimated gas (hex-encoded)","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"$ref":"#/components/schemas/HexUint256"},"id":{"type":"integer"}}}}}}}}}},"components":{"schemas":{"HexUint256":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"Unsigned 256-bit integer (hex-encoded with 0x prefix)"}}}}
```

## Get Logs

> Returns an array of log objects matching the given filter criteria.

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_getLogs":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Get Logs","operationId":"eth_getLogs","description":"Returns an array of log objects matching the given filter criteria.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_getLogs"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `filter` (object): Filter object with `address`, `topics`, `fromBlock`, `toBlock`\n"}}}}}},"responses":{"200":{"description":"Array of log objects","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"type":"array","items":{"$ref":"#/components/schemas/Log"}},"id":{"type":"integer"}}}}}}}}}},"components":{"schemas":{"Log":{"type":"object","description":"Event log emitted during transaction execution","properties":{"address":{"$ref":"#/components/schemas/Address","description":"Address of the contract that emitted the log"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/Bytes32"},"description":"Indexed event parameters"},"data":{"type":"string","description":"Non-indexed event data (hex-encoded)"}}},"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum address (20 bytes, hex-encoded with 0x prefix)"},"Bytes32":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"32-byte value (hex-encoded with 0x prefix). Used for transaction hashes, orderbook IDs, etc."}}}}
```

## Subscribe to Events (WebSocket)

> Creates a subscription to receive real-time updates over WebSocket. Updates are pushed\
> after each auction settlement for the subscribed orderbook(s) / account.\
> \
> \*\*Subscription types:\*\*\
> \- \`pod\_orderbook\` — each notification is a single \`OrderbookSnapshot\` for the orderbook\
> &#x20; (the same shape \`ob\_getOrderbook\` returns).\
> \- \`pod\_orders\` — each notification is an \*\*array of \`OrderUpdate\`\*\* describing what changed\
> &#x20; to orders this settlement: new/invalid orders, expirations, cancellations, modifications,\
> &#x20; and fills.\
> \- \`pod\_candles\` — a per-tick candle hint (\`CandleTick\`) per cleared orderbook: clearing\
> &#x20; price and volume at the batch deadline, for folding into the forming bar. Not a closed\
> &#x20; OHLCV bar (see \`ob\_getCandles\`).\
> \- \`pod\_markets\` — a \`MarketDynamicEntry\` per orderbook carrying live market statistics\
> &#x20; (last clearing price, 24h volume/high/low, and perp mark/oracle/funding/open-interest).\
> \- \`pod\_positions\` — a \`PositionsUpdate\` (\`{ account, data }\`, where \`data\` matches\
> &#x20; \`ob\_getPositions\`) for the subscribed account, pushed when a settlement touches it.\
> &#x20; \*\*Requires\*\* \`account\` (alias \`bidder\`).\
> \- \`pod\_triggers\` — a \`TriggersUpdate\` (the \`ob\_getTriggers\` fields plus \`account\`) for the\
> &#x20; subscribed account, pushed when a settlement touches it. \*\*Requires\*\* \`account\`.\
> \
> \`pod\_orderbook\`, \`pod\_orders\`, and \`pod\_candles\` are \*\*delta\*\* channels (they stream what\
> changed each tick). \`pod\_markets\`, \`pod\_positions\`, and \`pod\_triggers\` are \*\*state\*\* channels\
> (each pushes a current snapshot). See \`since\` below for how each behaves on catch-up.\
> \
> Subscriptions follow the standard Ethereum \`eth\_subscribe\` pattern:\
> 1\. Subscribe with \`eth\_subscribe\` → receive a subscription ID.\
> 2\. Receive updates as \`eth\_subscription\` notifications (see the notification shape below).\
> 3\. Cancel with \`eth\_unsubscribe\`, passing the subscription ID.\
> \
> \*\*Notification format.\*\* Updates arrive as JSON-RPC notifications, not responses:\
> \`\`\`json\
> {\
> &#x20; "jsonrpc": "2.0",\
> &#x20; "method": "eth\_subscription",\
> &#x20; "params": { "subscription": "0x\<id>", "result": \<payload> }\
> }\
> \`\`\`\
> The \`result\` payload shape depends on the subscription type (see the list above).\
> \
> \*\*Filtering.\*\* \`pod\_orderbook\`, \`pod\_orders\`, \`pod\_candles\`, and \`pod\_markets\` accept\
> \`orderbook\_ids\` (alias \`clob\_ids\`) to restrict the stream to specific orderbooks\
> (empty/omitted = all). \`pod\_orders\` additionally accepts \`bidder\` to deliver only that\
> account's updates. \`pod\_positions\` and \`pod\_triggers\` are account-scoped and \*\*require\*\*\
> \`account\` (alias \`bidder\`); they ignore \`orderbook\_ids\`. \`depth\` applies to \`pod\_orderbook\`\
> snapshots only.\
> \
> \*\*Catch-up (\`since\`).\*\* Optionally pass \`since\` (a solution time in \*\*microseconds\*\*) to\
> catch up with no gap or duplicate. Delta channels (\`pod\_orderbook\`, \`pod\_orders\`,\
> \`pod\_candles\`) replay buffered ticks with deadline strictly greater than \`since\`; if \`since\`\
> predates the retained buffer the subscription is rejected (backfill via REST and\
> resubscribe). State channels (\`pod\_markets\`, \`pod\_positions\`, \`pod\_triggers\`) emit one\
> current snapshot immediately, then stream live. Omitted = live-only. Which option applies to\
> which subscription type is summarised in \`SubscriptionParams\`.<br>

````json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_subscribe":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Subscribe to Events (WebSocket)","operationId":"eth_subscribe","description":"Creates a subscription to receive real-time updates over WebSocket. Updates are pushed\nafter each auction settlement for the subscribed orderbook(s) / account.\n\n**Subscription types:**\n- `pod_orderbook` — each notification is a single `OrderbookSnapshot` for the orderbook\n  (the same shape `ob_getOrderbook` returns).\n- `pod_orders` — each notification is an **array of `OrderUpdate`** describing what changed\n  to orders this settlement: new/invalid orders, expirations, cancellations, modifications,\n  and fills.\n- `pod_candles` — a per-tick candle hint (`CandleTick`) per cleared orderbook: clearing\n  price and volume at the batch deadline, for folding into the forming bar. Not a closed\n  OHLCV bar (see `ob_getCandles`).\n- `pod_markets` — a `MarketDynamicEntry` per orderbook carrying live market statistics\n  (last clearing price, 24h volume/high/low, and perp mark/oracle/funding/open-interest).\n- `pod_positions` — a `PositionsUpdate` (`{ account, data }`, where `data` matches\n  `ob_getPositions`) for the subscribed account, pushed when a settlement touches it.\n  **Requires** `account` (alias `bidder`).\n- `pod_triggers` — a `TriggersUpdate` (the `ob_getTriggers` fields plus `account`) for the\n  subscribed account, pushed when a settlement touches it. **Requires** `account`.\n\n`pod_orderbook`, `pod_orders`, and `pod_candles` are **delta** channels (they stream what\nchanged each tick). `pod_markets`, `pod_positions`, and `pod_triggers` are **state** channels\n(each pushes a current snapshot). See `since` below for how each behaves on catch-up.\n\nSubscriptions follow the standard Ethereum `eth_subscribe` pattern:\n1. Subscribe with `eth_subscribe` → receive a subscription ID.\n2. Receive updates as `eth_subscription` notifications (see the notification shape below).\n3. Cancel with `eth_unsubscribe`, passing the subscription ID.\n\n**Notification format.** Updates arrive as JSON-RPC notifications, not responses:\n```json\n{\n  \"jsonrpc\": \"2.0\",\n  \"method\": \"eth_subscription\",\n  \"params\": { \"subscription\": \"0x<id>\", \"result\": <payload> }\n}\n```\nThe `result` payload shape depends on the subscription type (see the list above).\n\n**Filtering.** `pod_orderbook`, `pod_orders`, `pod_candles`, and `pod_markets` accept\n`orderbook_ids` (alias `clob_ids`) to restrict the stream to specific orderbooks\n(empty/omitted = all). `pod_orders` additionally accepts `bidder` to deliver only that\naccount's updates. `pod_positions` and `pod_triggers` are account-scoped and **require**\n`account` (alias `bidder`); they ignore `orderbook_ids`. `depth` applies to `pod_orderbook`\nsnapshots only.\n\n**Catch-up (`since`).** Optionally pass `since` (a solution time in **microseconds**) to\ncatch up with no gap or duplicate. Delta channels (`pod_orderbook`, `pod_orders`,\n`pod_candles`) replay buffered ticks with deadline strictly greater than `since`; if `since`\npredates the retained buffer the subscription is rejected (backfill via REST and\nresubscribe). State channels (`pod_markets`, `pod_positions`, `pod_triggers`) emit one\ncurrent snapshot immediately, then stream live. Omitted = live-only. Which option applies to\nwhich subscription type is summarised in `SubscriptionParams`.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_subscribe"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `subscription_type` (string): one of `pod_orderbook`, `pod_orders`,\n   `pod_candles`, `pod_markets`, `pod_positions`, `pod_triggers`.\n2. `options` (SubscriptionParams): filter/format options; all fields optional\n   except where a channel requires `account`. Which fields take effect depends on\n   the subscription type:\n   - `orderbook_ids` (alias `clob_ids`, array of bytes32) — `pod_orderbook`,\n     `pod_orders`, `pod_candles`, `pod_markets`: restrict to those orderbooks\n     (empty/omitted = all). Ignored by `pod_positions` / `pod_triggers`.\n   - `depth` (integer) — **`pod_orderbook` only**: cap the price levels per side\n     in each snapshot (omit for all levels).\n   - `bidder` (alias `account`, address) — `pod_orders`: stream only that\n     bidder's updates (omit for all). **Required** for `pod_positions` and\n     `pod_triggers` (the account to stream).\n   - `since` (integer, microseconds) — all channels: catch-up watermark (see the\n     method description).\n","items":{"oneOf":[{"type":"string","enum":["pod_orderbook","pod_orders","pod_candles","pod_markets","pod_positions","pod_triggers"]},{"$ref":"#/components/schemas/SubscriptionParams"}]}}}}}}},"responses":{"200":{"description":"Messages received on the subscription. The immediate reply to `eth_subscribe` is the\nsubscription ID; every subsequent message is an `eth_subscription` notification whose\n`params.result` carries the streamed payload — its shape determined by the subscription\ntype (see the method description and `EthSubscriptionMessage`).\n","content":{"application/json":{"schema":{"oneOf":[{"title":"Subscription confirmation (immediate reply)","type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"type":"string","description":"Subscription ID"},"id":{"type":"integer"}}},{"$ref":"#/components/schemas/EthSubscriptionMessage"}]}}}}}}}},"components":{"schemas":{"SubscriptionParams":{"type":"object","description":"Options object (second `eth_subscribe` param). All fields are optional except that\n`pod_positions` / `pod_triggers` require `account` (alias `bidder`). Which fields take\neffect depends on the subscription type:\n- `orderbook_ids` (alias `clob_ids`) — `pod_orderbook`, `pod_orders`, `pod_candles`,\n  `pod_markets`; ignored by `pod_positions` / `pod_triggers`.\n- `depth` — `pod_orderbook` only.\n- `bidder` (alias `account`) — optional for `pod_orders`; **required** for `pod_positions`\n  and `pod_triggers`.\n- `since` — all channels (catch-up watermark, microseconds).\n","properties":{"depth":{"type":"integer","description":"`pod_orderbook` only: maximum price levels per side to include in snapshots. Omit for all levels."},"orderbook_ids":{"type":"array","items":{"$ref":"#/components/schemas/Bytes32"},"description":"Orderbook (clob) IDs to restrict the subscription to (accepted alias: `clob_ids`). Empty or omitted = all orderbooks. Honored by `pod_orderbook`, `pod_orders`, `pod_candles`, `pod_markets`; ignored by the account-scoped channels."},"clob_ids":{"type":"array","items":{"$ref":"#/components/schemas/Bytes32"},"description":"Accepted alias for `orderbook_ids`."},"bidder":{"$ref":"#/components/schemas/Address","description":"Account filter (accepted alias: `account`). For `pod_orders`, when set, streams only this bidder's updates (omit for all bidders). For `pod_positions` / `pod_triggers` this is **required** — the account whose positions / triggers to stream."},"since":{"type":"integer","format":"int64","description":"Catch-up watermark: a solution time in microseconds. Delta channels replay buffered ticks after it; state channels emit one current snapshot then stream live. Omit for live-only. If a delta channel's `since` predates the retained buffer, the subscription is rejected."}}},"Bytes32":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"32-byte value (hex-encoded with 0x prefix). Used for transaction hashes, orderbook IDs, etc."},"Address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Ethereum address (20 bytes, hex-encoded with 0x prefix)"},"EthSubscriptionMessage":{"type":"object","description":"An asynchronous `eth_subscription` notification pushed over the WebSocket after\n`eth_subscribe`. The `params.result` payload depends on the subscription type:\n- `pod_orderbook` → an `OrderbookSnapshot`.\n- `pod_orders` → an array of `OrderUpdate`.\n- `pod_candles` → a `CandleTick`.\n- `pod_markets` → a `MarketDynamicEntry`.\n- `pod_positions` → a `PositionsUpdate`.\n- `pod_triggers` → a `TriggersUpdate`.\n","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"method":{"type":"string","enum":["eth_subscription"]},"params":{"type":"object","properties":{"subscription":{"type":"string","description":"The subscription ID this message belongs to."},"result":{"description":"The streamed payload — shape determined by the subscription type.","oneOf":[{"$ref":"#/components/schemas/OrderbookSnapshot"},{"type":"array","items":{"$ref":"#/components/schemas/OrderUpdate"}},{"$ref":"#/components/schemas/CandleTick"},{"$ref":"#/components/schemas/MarketDynamicEntry"},{"$ref":"#/components/schemas/PositionsUpdate"},{"$ref":"#/components/schemas/TriggersUpdate"}]}}}}},"OrderbookSnapshot":{"type":"object","description":"Current state of an orderbook with aggregated buy/sell levels.\nThe response field is `orderbook_id`; `clob_id` is accepted as an input alias when deserializing.\n","properties":{"orderbook_id":{"$ref":"#/components/schemas/Bytes32","description":"Orderbook identifier. Also accepts `clob_id` as an alias on input."},"buys":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TickSnapshot"},"description":"Buy orders keyed by price (decimal string), sorted by price descending"},"sells":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TickSnapshot"},"description":"Sell orders keyed by price (decimal string), sorted by price ascending"},"clearing_price":{"$ref":"#/components/schemas/HexUint256","description":"Current/last clearing price"},"grouping_precision":{"$ref":"#/components/schemas/HexUint256","description":"Price grouping precision used for aggregation (1e18, hex-encoded)"},"timestamp":{"type":"integer","description":"Snapshot timestamp in microseconds"},"new_orders_count":{"type":"integer","description":"Number of new orders since the last snapshot"},"buys_count":{"type":"integer","description":"Total number of buy orders in the orderbook (regardless of depth parameter)"},"sells_count":{"type":"integer","description":"Total number of sell orders in the orderbook (regardless of depth parameter)"},"oracle_price":{"type":"string","nullable":true,"description":"Perp orderbooks only. Pyth oracle price from the most recent perp solution's `priceProof` (1e18, hex-encoded). `null` for spot orderbooks."},"funding_rate":{"type":"string","nullable":true,"description":"Perp orderbooks only. Funding rate computed for this batch (per-`funding_window`, signed 1e18 decimal string). `null` for spot orderbooks."},"funding_index":{"type":"string","nullable":true,"description":"Perp orderbooks only. Cumulative per-unit-size funding accumulator after this batch (signed 1e18 decimal string). `null` for spot orderbooks."},"funding_last_updated":{"type":"integer","format":"int64","nullable":true,"description":"Perp orderbooks only. Microsecond timestamp of the batch that produced the funding update. `null` for spot orderbooks."}}},"TickSnapshot":{"type":"object","description":"Aggregated order volume at a specific price level","properties":{"volume":{"$ref":"#/components/schemas/HexUint256","description":"Total volume available at this price level (1e18, hex-encoded)"},"minimum_expiry":{"type":"integer","description":"Minimum expiry timestamp (microseconds) for orders at this price level"}}},"HexUint256":{"type":"string","pattern":"^0x[a-fA-F0-9]+$","description":"Unsigned 256-bit integer (hex-encoded with 0x prefix)"},"OrderUpdate":{"type":"object","description":"A single change to an order, pushed in the `pod_orders` notification array. It is a\n`type`-tagged union: the `type` field selects the variant and the remaining fields depend\non it.\n- `new` / `invalid`: the full `Order` fields are inlined alongside `type` (an `invalid`\n  order was rejected at execution and never entered the book; the reason is on its\n  `status`).\n- `expired` / `canceled`: only `type` and `order_id` are present.\n- `modified`: a resting order's price and/or size was changed in place by an `update`\n  intent — `type`, `order_id`, and the new `new_price` / `new_size` are present.\n- `fill`: the `OrderFillUpdate` fields are inlined alongside `type`.\n","required":["type"],"properties":{"type":{"type":"string","enum":["new","invalid","expired","canceled","modified","fill"],"description":"Discriminator selecting the variant."},"order_id":{"$ref":"#/components/schemas/Bytes32","description":"Present for `expired`, `canceled`, and `modified` — the affected order id."},"new_price":{"$ref":"#/components/schemas/HexUint256","description":"`modified` only: the order's price after the change (1e18)."},"new_size":{"$ref":"#/components/schemas/HexUint256","description":"`modified` only: the order's remaining base size after the change (1e18, unsigned magnitude — side is unchanged from the original `new`)."}}},"CandleTick":{"type":"object","description":"Per-tick candle hint streamed on the `pod_candles` subscription — one object per orderbook\ncleared this settlement. It is not a closed OHLCV bar (use `ob_getCandles` for those); the\nclient folds it into the forming bar.\n","required":["orderbook","timestamp_us","price","volume"],"properties":{"orderbook":{"$ref":"#/components/schemas/Bytes32"},"timestamp_us":{"type":"integer","format":"int64","description":"Batch deadline (settlement time) in microseconds."},"price":{"type":"string","description":"Clearing price for this tick (decimal, 1e18)."},"volume":{"type":"string","description":"Total volume cleared this tick (decimal, 1e18)."}}},"MarketDynamicEntry":{"type":"object","description":"Live market statistics for one orderbook, streamed on the `pod_markets` subscription (one\nobject per orderbook). Optional fields are omitted (not null) when unset — e.g. perp-only\nfields on a spot market, or stats with no data yet.\n","required":["orderbook_id","volume_24h"],"properties":{"orderbook_id":{"$ref":"#/components/schemas/Bytes32"},"last_clearing_price":{"type":"string","description":"Most recent clearing price (decimal, 1e18). Omitted if the market has not cleared."},"volume_24h":{"type":"string","description":"Rolling 24h traded volume (decimal, 1e18)."},"high_24h":{"type":"string","description":"24h high clearing price (decimal, 1e18). Omitted if unavailable."},"low_24h":{"type":"string","description":"24h low clearing price (decimal, 1e18). Omitted if unavailable."},"price_change_24h":{"type":"integer","format":"int128","description":"24h price change (signed, 1e18), as a JSON number. Omitted if unavailable."},"oracle_price":{"type":"string","description":"Perp only: latest oracle price (decimal, 1e18)."},"mark_price":{"type":"string","description":"Perp only: current mark price (decimal, 1e18)."},"funding_rate":{"type":"string","description":"Perp only: current funding rate (decimal)."},"funding_index":{"type":"string","description":"Perp only: cumulative funding index (decimal)."},"funding_last_updated_us":{"type":"integer","format":"int64","description":"Perp only: last funding update time (microseconds)."},"open_interest":{"type":"string","description":"Perp only: open interest (decimal, 1e18)."}}},"PositionsUpdate":{"type":"object","description":"A `pod_positions` notification — the account's full positions snapshot, pushed for a settlement that touched the account.","required":["account","data"],"properties":{"account":{"$ref":"#/components/schemas/Address"},"data":{"$ref":"#/components/schemas/PositionsResponse"}}},"PositionsResponse":{"type":"object","description":"Account positions across all orderbooks with aggregate PnL.","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/Position"},"description":"Heterogeneous list of spot holdings and open perp positions."},"total_unrealized_pnl":{"type":"string","description":"Sum of `unrealized_pnl` across every spot holding and perp position (signed, 1e18 USD)."},"total_realized_pnl":{"type":"string","description":"Lifetime portfolio-wide spot realized PnL plus the account-level perp realized-PnL counter. Both are cumulative across the account's history — closing a perp does not zero its contribution (signed, 1e18 USD).\n"},"perps_equity":{"type":"string","description":"Cash adjusted for unsettled funding plus unrealized PnL across all open perp positions. Excludes spot holdings (signed, 1e18 USD)."},"account_value":{"type":"string","description":"`perps_equity` plus the mark value of all spot holdings (signed, 1e18 USD)."},"cash":{"type":"string","description":"Deposited collateral adjusted for unsettled funding. Signed — can be negative if the account is underwater (1e18 USD)."},"withdrawable_cash":{"$ref":"#/components/schemas/HexUint256","description":"Free margin — `cash` minus the initial margin reserved by open positions (1e18 USD)."},"net_deposits":{"type":"string","description":"Net native collateral deposited minus withdrawn (signed, 1e18 USD). Negative once realized profit is withdrawn; lifetime PnL is `account_value − net_deposits`."}}},"Position":{"description":"Tagged union: a single entry in `PositionsResponse.positions`. The `kind` field selects between a `SpotHolding` (one per token) or a `PerpPosition` (one per pair).\n","oneOf":[{"$ref":"#/components/schemas/SpotHolding"},{"$ref":"#/components/schemas/PerpPosition"}],"discriminator":{"propertyName":"kind","mapping":{"spot":"#/components/schemas/SpotHolding","perp":"#/components/schemas/PerpPosition"}}},"SpotHolding":{"type":"object","description":"A token balance with cost-basis tracking. One per token the wallet has touched on a spot market.","properties":{"kind":{"type":"string","enum":["spot"],"description":"Discriminator for the `Position` union."},"orderbook_id":{"$ref":"#/components/schemas/Bytes32"},"base_symbol":{"type":"string"},"quote_symbol":{"type":"string"},"balance":{"$ref":"#/components/schemas/HexUint256","description":"Total base tokens held for this market (free + locked, 1e18)."},"free_balance":{"$ref":"#/components/schemas/HexUint256","description":"Spendable portion of `balance` after sell-side order locks (1e18)."},"locked_balance":{"$ref":"#/components/schemas/HexUint256","description":"Base tokens locked in open sell orders (`balance - free_balance`, 1e18)."},"cost_basis":{"$ref":"#/components/schemas/HexUint256","description":"Total quote spent to acquire `balance` (1e18 USD)."},"mark_price":{"$ref":"#/components/schemas/HexUint256","description":"Last clearing price for this token's market (1e18)."},"unrealized_pnl":{"type":"string","description":"`(mark - avg_cost) × balance` (signed, 1e18 USD)."},"realized_pnl":{"type":"string","description":"Lifetime realized PnL on the user's spot trading (signed, 1e18 USD; portfolio-wide for v1)."}}},"PerpPosition":{"type":"object","description":"A leveraged perp position. One per (user, pair).","properties":{"kind":{"type":"string","enum":["perp"],"description":"Discriminator for the `Position` union."},"orderbook_id":{"$ref":"#/components/schemas/Bytes32"},"base_symbol":{"type":"string"},"quote_symbol":{"type":"string"},"side":{"$ref":"#/components/schemas/PerpPositionSide"},"size":{"type":"string","description":"Signed position size in base units (1e18). Positive = long, negative = short."},"notional":{"$ref":"#/components/schemas/HexUint256","description":"`|size| × mark_price / 1e18` — dollar value of exposure (1e18)."},"entry_price":{"$ref":"#/components/schemas/HexUint256","description":"Volume-weighted average entry price; updated only on opening fills (1e18)."},"mark_price":{"$ref":"#/components/schemas/HexUint256","description":"Latest mark price for the pair, post batch clearing (1e18)."},"margin":{"$ref":"#/components/schemas/HexUint256","description":"Allocated initial margin; cumulative across opens/increases, released proportionally on partial closes (1e18)."},"leverage":{"$ref":"#/components/schemas/HexUint256","description":"`notional × 1e18 / margin`. Effective leverage (0 if `margin` is 0)."},"funding_accrued":{"type":"string","description":"`(market.funding − position.entry_funding) × size` (signed, 1e18 USD)."},"liquidation_price":{"$ref":"#/components/schemas/HexUint256","description":"Mark price at which this position would be liquidated against its own `margin` and the market's maintenance-margin rate. Funding ignored. 0 when position is empty."},"unrealized_pnl":{"type":"string","description":"`((mark − entry) − (funding − entry_funding)) × size` (signed, 1e18 USD)."},"realized_pnl":{"type":"string","description":"Lifetime realized PnL on this position (signed, 1e18 USD). Resets to 0 when the position closes — the next open of the same pair starts fresh."},"stop_loss":{"$ref":"#/components/schemas/HexUint256","description":"Reserved — stop-loss not yet supported.","nullable":true},"take_profit":{"$ref":"#/components/schemas/HexUint256","description":"Reserved — take-profit not yet supported.","nullable":true}}},"PerpPositionSide":{"type":"string","enum":["long","short"],"description":"Side of a perpetual position, derived from the sign of `size`."},"TriggersUpdate":{"type":"object","description":"A `pod_triggers` notification — the account's armed TP/SL triggers, pushed for a settlement that touched the account. Carries the `GetTriggersResponse` fields inlined alongside `account`.","required":["account","triggers","total_count"],"properties":{"account":{"$ref":"#/components/schemas/Address"},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/TriggerOrderResponse"}},"total_count":{"type":"integer","description":"Count of triggers for the account before pagination."},"next_cursor":{"type":"string","nullable":true,"description":"Pagination cursor, wire format `\"{orderbook_id}:{order_id}\"`. Null if no more results."}}},"TriggerOrderResponse":{"type":"object","description":"An armed TP/SL trigger order, as returned by `ob_getTriggers`.","properties":{"orderbook_id":{"$ref":"#/components/schemas/Bytes32"},"order_id":{"$ref":"#/components/schemas/Bytes32","description":"Identifier of the trigger (and of the synthetic order it produces when it fires)."},"tx_hash":{"$ref":"#/components/schemas/Bytes32","description":"Hash of the `submitTrigger` transaction that armed this trigger."},"bidder":{"$ref":"#/components/schemas/Address"},"nonce":{"type":"integer","format":"int64"},"size":{"type":"string","description":"Signed size of the synthetic order produced when the trigger fires (decimal int256). Positive = buy/long, negative = sell/short."},"limit_price":{"$ref":"#/components/schemas/HexUint256","description":"Limit price of the synthetic order produced when the trigger fires (1e18)."},"trigger_price":{"$ref":"#/components/schemas/HexUint256","description":"Mark-price threshold that arms the trigger (1e18)."},"trigger_type":{"$ref":"#/components/schemas/TriggerType"},"grouping":{"$ref":"#/components/schemas/TriggerGrouping"},"reduce_only":{"type":"boolean"},"ioc":{"type":"boolean","description":"Immediate-or-cancel — any unfilled remainder of the fired order is canceled at end of batch."},"deadline":{"$ref":"#/components/schemas/Timestamp"},"end":{"$ref":"#/components/schemas/Timestamp","description":"TTL expiry — the trigger is swept once `end < batch_deadline` (microseconds)."}}},"TriggerType":{"type":"string","enum":["take_profit","stop_loss"],"description":"Type of a TP/SL trigger order on a perp market:\n- `take_profit`: fires when the mark price moves favorably across `trigger_price`\n- `stop_loss`: fires when the mark price moves adversely across `trigger_price`\n\nAlso set on a synthetic order (`kind = triggered`) that a fired trigger produced.\n"},"TriggerGrouping":{"type":"string","enum":["none","asset","position"],"description":"Whether a trigger (and any synthetic order it produces) is bound to the bidder's exposure on the pair:\n- `none`: standalone — the trigger is removed only by a user cancel, TTL expiry, or its own fire; any synthetic order it produced survives independently\n- `asset`: exposure-bound — on perp markets the venue removes the armed trigger *and* any resting synthetic order it produced once the bidder's position on the pair reaches size 0; on spot markets, once the bidder's base-asset holdings reach 0\n\n`asset` was formerly named `position` (same semantics, same ABI value); nodes running older builds still emit `position` and clients should treat the two as equivalent.\n\nOmitted from an `Order` response when it is the default `none`.\n"},"Timestamp":{"type":"integer","format":"int64","description":"Unix timestamp in microseconds (not milliseconds or seconds)"}}}}
````

## Cancel a Subscription (WebSocket)

> Cancels an active subscription created with \`eth\_subscribe\`. Pass the subscription ID\
> returned by the original \`eth\_subscribe\` call. Returns \`true\` if a matching subscription\
> was found and removed.<br>

```json
{"openapi":"3.0.0","info":{"title":"JSON-RPC API","version":"1.0.0"},"tags":[{"name":"Ethereum Interface (eth_)","description":"Ethereum Interface (`eth_`) provides an Ethereum-compatible JSON-RPC layer\nthat allows existing wallets, tools, and libraries to interact with Pod\nusing familiar methods and conventions. It is designed to be drop-in\ncompatible with standard Ethereum client workflows, allowing developers to\nuse common tooling such as `ethers.js`, `alloy.rs`, and `cast` without\nmodification.\n\nThe interface covers the transaction submission and receipt lifecycle,\nincluding balance and nonce discovery, read-only contract calls, log\nqueries, and real-time subscriptions.\n\n📝 This is a JSON-RPC 2.0 API. The request path is not important; the\nmethod to execute is defined by the method field in the request body. You\ncan send all requests to /, and any path after / is optional and used only\nfor documentation clarity.\n\n&nbsp; &nbsp; &nbsp;\n"}],"servers":[{"url":"https://rpc.podtestnet.dev/","description":"Pod testnet"}],"paths":{"/eth_unsubscribe":{"post":{"tags":["Ethereum Interface (eth_)"],"summary":"Cancel a Subscription (WebSocket)","operationId":"eth_unsubscribe","description":"Cancels an active subscription created with `eth_subscribe`. Pass the subscription ID\nreturned by the original `eth_subscribe` call. Returns `true` if a matching subscription\nwas found and removed.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method","params","id"],"properties":{"jsonrpc":{"type":"string","default":"2.0"},"method":{"type":"string","default":"eth_unsubscribe"},"id":{"type":"integer","default":1},"params":{"type":"array","description":"Parameters:\n1. `subscription_id` (string): The ID returned by `eth_subscribe`\n","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Whether the subscription was found and cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"result":{"type":"boolean"},"id":{"type":"integer"}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.v2.pod.network/guides-references/references/json-rpc/ethereum-interface-eth.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
