# Create a New Pair

A pre-stored pair is used in this procedure. Token contract should be instantiated in advance.

The Factory JSON parameter for instantiation is below:

```javascript
{
  "pair_code_id": 1,
  "pair_code_hash": "<HASH>",
  "token_code_id": 2,
  "token_code_hash": "<HASH>",
  "init_hook": { // optional
    "msg": "base64_encoded_json_data",
    "contract_addr": "secret...",
    "callback_code_hash": "<HASH>"
  }
}
```


---

# 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://docs.secretswap.net/developer-guide/create-a-new-pair.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.
