# Margin Trading

In order to enter a trade, call `marginTrade` on the respective iToken contract. Let's say you want to trade RBTC against XUSD. You enter a BTC long position by sending either of these currencies to the iXUSD contract and a short position by sending either of them to the iRBTC contract. The process is depicted below.

<figure><img src="/files/7Iw1du8GNIYxUhyHNaIn" alt=""><figcaption><p>How to open long or short positions.</p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://build.sovryn.com/builder-portal/smart-contracts/lending-and-margin-trading-protocol/margin-trading.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
