# On-chain method

<figure><img src="https://2257238722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FO3yn4VEaL8BiNJrj2zk3%2Fuploads%2Fbgw4w6i7QbfEtKLgjfYU%2Fimage.png?alt=media&#x26;token=4421628d-674f-497a-ab1c-eaf0728a2e40" alt=""><figcaption></figcaption></figure>

* tgUSD staking contract address: `EQDsRxOvYyhOAi-zHBSN2NkHcjwFB1aaMSnqJG7Chm14x02P`
* Send an `OP_PROVIDE_CURRENT_QUOTE` message to the tgUSD Staking contract, which will respond with an `OP_TAKE_CURRENT_QUOTE` message containing the rate information.
* `OP_PROVIDE_CURRENT_QUOTE` Message:

<table><thead><tr><th width="245.16796875">field</th><th>type</th><th>description</th><th>ref</th></tr></thead><tbody><tr><td><code>OP_PROVIDE_CURRENT_QUOTE</code></td><td>uint32</td><td><code>0x984d8449</code></td><td>0</td></tr><tr><td>queryId</td><td>uint64</td><td></td><td>0</td></tr><tr><td>recipient</td><td>Address</td><td>The address who receive <code>OP_TAKE_CURRENT_QUOTE</code></td><td>0</td></tr><tr><td>customPayload</td><td>Maybe&#x3C;Cell></td><td>Send <code>OP_TAKE_CURRENT_QUOTE</code> to recipient with this <code>customPayload</code></td><td>0</td></tr></tbody></table>

* `OP_TAKE_CURRENT_QUOTE` Message:

<table><thead><tr><th width="225.07421875">field</th><th>type</th><th>description</th><th>ref</th></tr></thead><tbody><tr><td><code>OP_TAKE_CURRENT_QUOTE</code></td><td>uint32</td><td><code>0x80ed6c2e</code></td><td>0</td></tr><tr><td>queryId</td><td>uint64</td><td></td><td>0</td></tr><tr><td>totalActiveStake</td><td>coins</td><td>Currently active staked amount (including distributed rewards)</td><td>0</td></tr><tr><td>totalShares</td><td>coins</td><td></td><td>0</td></tr><tr><td>timestamp</td><td>uint32</td><td>The timestamp when the rate information is provided</td><td>0</td></tr><tr><td>customPayload</td><td>Maybe&#x3C;Cell></td><td></td><td>0</td></tr></tbody></table>

* `totalActiveStake` / `totalShares` represents the current conversion rate of 1 stgUSD in tgUSD (You can control the rounding precision as needed)
