> For the complete documentation index, see [llms.txt](https://docs.secretswap.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.secretswap.net/developer-guide/create-a-new-pair.md).

# 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>"
  }
}
```
