> For the complete documentation index, see [llms.txt](https://docs.21x.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.21x.eu/sample-use-cases-and-code/direct-smart-contract-interaction.md).

# Direct Smart Contract Interaction

Alternatively to our Python SDK, customers can use third-party Web3 libraries or platforms like fireblocks to directly interact with the smart contract on the Polygon network. This approach requires a understanding of smart contract inte ractions and the required payload.

The following three examples will give you some more insides about the required interaction with the smart contract.

### Use Cases

#### Creating a Buy Order

To create a buy order, you need to prepare the payload with specific parameters detailing price, quantity, and other relevant details.

#### Creating a Sell Order

Similar to a buy order, a sell order requires you to specify parameters in the payload such as the asset you intend to sell and your desired price.

#### Canceling Open Orders

Canceling orders requires identification of the specific order you want to cancel. Ensure the payload includes the correct order ID.

###


---

# 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.21x.eu/sample-use-cases-and-code/direct-smart-contract-interaction.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.
