Smart Contracts (Testnet)

Module: CDEX
back to overview
CDEX
Methods: 35
Instances: 3
Initialization

Parameters
{
  "fee_rates": [
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>"
  ],
  "owner_id": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "protocol_fee_fraction": "<UInt16>"
}
Errors
"<String>"
Event
{
  "Enum": [
    {
      "Deposit": {
        "amount": "<String of size at most 74 containing an unsigned integer.>",
        "balance": "<String of size at most 74 containing an unsigned integer.>",
        "token_id": {
          "contract": {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          },
          "id": "<String with lowercase hex>"
        },
        "user": {
          "Enum": [
            {
              "Account": [
                "<AccountAddress>"
              ]
            },
            {
              "Contract": [
                {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                }
              ]
            }
          ]
        }
      }
    },
    {
      "Withdraw": {
        "amount": "<String of size at most 74 containing an unsigned integer.>",
        "balance": "<String of size at most 74 containing an unsigned integer.>",
        "token_id": {
          "contract": {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          },
          "id": "<String with lowercase hex>"
        },
        "user": {
          "Enum": [
            {
              "Account": [
                "<AccountAddress>"
              ]
            },
            {
              "Contract": [
                {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                }
              ]
            }
          ]
        }
      }
    },
    {
      "OpenPosition": {
        "amounts": [
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>"
        ],
        "fee_rate": "<UInt16>",
        "pool": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          },
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          }
        ],
        "position_id": "<UInt64>",
        "ticks_range": [
          "<Int32>",
          "<Int32>"
        ],
        "user": {
          "Enum": [
            {
              "Account": [
                "<AccountAddress>"
              ]
            },
            {
              "Contract": [
                {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                }
              ]
            }
          ]
        }
      }
    },
    {
      "HarvestFee": {
        "amounts": [
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>"
        ],
        "position_id": "<UInt64>"
      }
    },
    {
      "ClosePosition": {
        "amounts": [
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>"
        ],
        "position_id": "<UInt64>"
      }
    },
    {
      "Swap": {
        "amounts": [
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>"
        ],
        "fees": [
          [
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "<UInt16>"
          ]
        ],
        "tokens": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          },
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          }
        ],
        "user": {
          "Enum": [
            {
              "Account": [
                "<AccountAddress>"
              ]
            },
            {
              "Contract": [
                {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                }
              ]
            }
          ]
        }
      }
    },
    {
      "UpdatePoolState": {
        "amounts_a": [
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>"
        ],
        "amounts_b": [
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>",
          "<String of size at most 74 containing an unsigned integer.>"
        ],
        "liquidities": [
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>"
        ],
        "pool": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          },
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          }
        ],
        "reason": {
          "Enum": [
            {
              "AddLiquidity": []
            },
            {
              "RemoveLiquidity": []
            },
            {
              "Swap": []
            }
          ]
        },
        "sqrt_prices": [
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>"
        ]
      }
    },
    {
      "AddVerifiedTokens": {
        "tokens": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          }
        ]
      }
    },
    {
      "RemoveVerifiedTokens": {
        "tokens": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          }
        ]
      }
    },
    {
      "AddGuardAccounts": {
        "accounts": [
          {
            "Enum": [
              {
                "Account": [
                  "<AccountAddress>"
                ]
              },
              {
                "Contract": [
                  {
                    "index": "<UInt64>",
                    "subindex": "<UInt64>"
                  }
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "RemoveGuardAccounts": {
        "accounts": [
          {
            "Enum": [
              {
                "Account": [
                  "<AccountAddress>"
                ]
              },
              {
                "Contract": [
                  {
                    "index": "<UInt64>",
                    "subindex": "<UInt64>"
                  }
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "SuspendPayableAPI": {
        "account": {
          "Enum": [
            {
              "Account": [
                "<AccountAddress>"
              ]
            },
            {
              "Contract": [
                {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                }
              ]
            }
          ]
        }
      }
    },
    {
      "ResumePayableAPI": {
        "account": {
          "Enum": [
            {
              "Account": [
                "<AccountAddress>"
              ]
            },
            {
              "Contract": [
                {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                }
              ]
            }
          ]
        }
      }
    },
    {
      "TickUpdate": {
        "fee_level": "<UInt8>",
        "liquidity_change": "<String of size 16 containing lowercase hex characters.>",
        "pool": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          },
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          }
        ],
        "tick": "<Int32>"
      }
    }
  ]
}
Methods

Parameters
{
  "contract": {
    "index": "<UInt64>",
    "subindex": "<UInt64>"
  },
  "id": "<String with lowercase hex>"
}
Errors
"<String>"
Return
[]

Parameters
{
  "migrate": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          [
            "<String>",
            "<String with lowercase hex>"
          ]
        ]
      }
    ]
  },
  "module": "<String of size 64 containing lowercase hex characters.>"
}
Errors
None
Return
None

Parameters
[]
Errors
"<String>"
Return
{
  "fee_divisor": "<UInt16>",
  "fee_rates": [
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>",
    "<UInt16>"
  ],
  "owner": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "pool_count": "<UInt64>",
  "protocol_fee_fraction": "<UInt16>"
}

Parameters
{
  "Enum": [
    {
      "Account": [
        "<AccountAddress>"
      ]
    },
    {
      "Contract": [
        {
          "index": "<UInt64>",
          "subindex": "<UInt64>"
        }
      ]
    }
  ]
}
Errors
"<String>"
Return
[
  [
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    },
    "<String of size at most 74 containing an unsigned integer.>"
  ]
]

Parameters
[
  {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
]
Errors
"<String>"
Return
"<String of size at most 74 containing an unsigned integer.>"

Parameters
[]
Errors
"<String>"
Return
[
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
]

Parameters
{
  "Enum": [
    {
      "Account": [
        "<AccountAddress>"
      ]
    },
    {
      "Contract": [
        {
          "index": "<UInt64>",
          "subindex": "<UInt64>"
        }
      ]
    }
  ]
}
Errors
"<String>"
Return
[
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
]

Parameters
[
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  },
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
]
Errors
"<String>"
Return
{
  "Enum": [
    {
      "None": []
    },
    {
      "Some": [
        {
          "fee_divisor": "<UInt16>",
          "fee_rates": [
            "<UInt16>",
            "<UInt16>",
            "<UInt16>",
            "<UInt16>",
            "<UInt16>",
            "<UInt16>",
            "<UInt16>",
            "<UInt16>"
          ],
          "liquidities": [
            [
              [
                [
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>"
                ]
              ]
            ],
            [
              [
                [
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>"
                ]
              ]
            ],
            [
              [
                [
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>"
                ]
              ]
            ],
            [
              [
                [
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>"
                ]
              ]
            ],
            [
              [
                [
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>"
                ]
              ]
            ],
            [
              [
                [
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>"
                ]
              ]
            ],
            [
              [
                [
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>"
                ]
              ]
            ],
            [
              [
                [
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>",
                  "<UInt64>"
                ]
              ]
            ]
          ],
          "sqrt_effective_prices": [
            [
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ],
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ]
            ],
            [
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ],
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ]
            ],
            [
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ],
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ]
            ],
            [
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ],
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ]
            ],
            [
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ],
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ]
            ],
            [
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ],
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ]
            ],
            [
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ],
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ]
            ],
            [
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ],
              [
                "<String of size at most 74 containing an unsigned integer.>",
                "<String of size at most 74 containing an unsigned integer.>"
              ]
            ]
          ],
          "sqrt_spot_prices": [
            [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ]
          ],
          "total_reserves": [
            "<String of size at most 74 containing an unsigned integer.>",
            "<String of size at most 74 containing an unsigned integer.>"
          ]
        }
      ]
    }
  ]
}

Parameters
[
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  },
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
]
Errors
"<String>"
Return
{
  "Enum": [
    {
      "None": []
    },
    {
      "Some": [
        [
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>",
          "<String of size 16 containing lowercase hex characters.>"
        ]
      ]
    }
  ]
}

Parameters
[]
Errors
"<String>"
Return
{
  "version": "<String>"
}

Parameters
[]
Errors
"<String>"
Return
{
  "Enum": [
    {
      "Account": [
        "<AccountAddress>"
      ]
    },
    {
      "Contract": [
        {
          "index": "<UInt64>",
          "subindex": "<UInt64>"
        }
      ]
    }
  ]
}

Parameters
[
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
]
Errors
"<String>"
Return
[]

Parameters
[
  {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
]
Errors
"<String>"
Return
[]

Parameters
[
  {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  }
]
Errors
"<String>"
Return
[]

Parameters
[
  {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  }
]
Errors
"<String>"
Return
[]

Parameters
"<UInt16>"
Errors
"<String>"
Return
[]

Parameters
[
  {
    "Enum": [
      {
        "RegisterAccount": []
      },
      {
        "RegisterTokens": [
          [
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          ]
        ]
      },
      {
        "SwapExactIn": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "amount_limit": "<String of size at most 74 containing an unsigned integer.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "SwapExactOut": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "amount_limit": "<String of size at most 74 containing an unsigned integer.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "SwapToPrice": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "effective_price_limit": "<String of size 16 containing lowercase hex characters.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "Deposit": []
      },
      {
        "Withdraw": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          },
          "<String of size at most 74 containing an unsigned integer.>",
          {
            "Enum": [
              {
                "None": []
              },
              {
                "Some": [
                  [
                    "<String>",
                    "<String with lowercase hex>"
                  ]
                ]
              }
            ]
          }
        ]
      },
      {
        "OpenPosition": {
          "fee_rate": "<UInt16>",
          "position": {
            "amount_ranges": [
              {
                "max": "<String of size at most 74 containing an unsigned integer.>",
                "min": "<String of size at most 74 containing an unsigned integer.>"
              },
              {
                "max": "<String of size at most 74 containing an unsigned integer.>",
                "min": "<String of size at most 74 containing an unsigned integer.>"
              }
            ],
            "ticks_range": [
              {
                "Enum": [
                  {
                    "None": []
                  },
                  {
                    "Some": [
                      "<Int32>"
                    ]
                  }
                ]
              },
              {
                "Enum": [
                  {
                    "None": []
                  },
                  {
                    "Some": [
                      "<Int32>"
                    ]
                  }
                ]
              }
            ]
          },
          "tokens": [
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          ]
        }
      },
      {
        "ClosePosition": [
          "<UInt64>"
        ]
      },
      {
        "WithdrawFee": [
          "<UInt64>"
        ]
      }
    ]
  }
]
Errors
"<String>"
Return
{
  "Enum": [
    {
      "None": []
    },
    {
      "Some": [
        "<String of size at most 74 containing an unsigned integer.>"
      ]
    }
  ]
}

Parameters
{
  "amount_in": "<String of size at most 74 containing an unsigned integer.>",
  "min_amount_out": "<String of size at most 74 containing an unsigned integer.>",
  "token_ids": [
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    }
  ]
}
Errors
"<String>"
Return
[
  "<String of size at most 74 containing an unsigned integer.>",
  "<String of size at most 74 containing an unsigned integer.>"
]

Parameters
{
  "amount_out": "<String of size at most 74 containing an unsigned integer.>",
  "max_amount_in": "<String of size at most 74 containing an unsigned integer.>",
  "token_ids": [
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    }
  ]
}
Errors
"<String>"
Return
[
  "<String of size at most 74 containing an unsigned integer.>",
  "<String of size at most 74 containing an unsigned integer.>"
]

Parameters
{
  "amount_in": "<String of size at most 74 containing an unsigned integer.>",
  "price_limit": "<String of size 16 containing lowercase hex characters.>",
  "token_ids": [
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    }
  ]
}
Errors
"<String>"
Return
[
  "<String of size at most 74 containing an unsigned integer.>",
  "<String of size at most 74 containing an unsigned integer.>"
]

Parameters
{
  "fee_rate": "<UInt16>",
  "position": {
    "amount_ranges": [
      {
        "max": "<String of size at most 74 containing an unsigned integer.>",
        "min": "<String of size at most 74 containing an unsigned integer.>"
      },
      {
        "max": "<String of size at most 74 containing an unsigned integer.>",
        "min": "<String of size at most 74 containing an unsigned integer.>"
      }
    ],
    "ticks_range": [
      {
        "Enum": [
          {
            "None": []
          },
          {
            "Some": [
              "<Int32>"
            ]
          }
        ]
      },
      {
        "Enum": [
          {
            "None": []
          },
          {
            "Some": [
              "<Int32>"
            ]
          }
        ]
      }
    ]
  },
  "token_ids": [
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    },
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    }
  ]
}
Errors
"<String>"
Return
{
  "amounts": [
    "<String of size at most 74 containing an unsigned integer.>",
    "<String of size at most 74 containing an unsigned integer.>"
  ],
  "liquidity": "<String of size 16 containing lowercase hex characters.>",
  "position_id": "<UInt64>"
}

Parameters
"<UInt64>"
Errors
"<String>"
Return
[]

Parameters
"<UInt64>"
Errors
"<String>"
Return
[
  "<String of size at most 74 containing an unsigned integer.>",
  "<String of size at most 74 containing an unsigned integer.>"
]

Parameters
"<UInt64>"
Errors
"<String>"
Return
{
  "balance": [
    "<String of size at most 74 containing an unsigned integer.>",
    "<String of size at most 74 containing an unsigned integer.>"
  ],
  "fee_level": "<UInt8>",
  "init_sqrt_price": "<String of size 16 containing lowercase hex characters.>",
  "net_liquidity": "<String of size 16 containing lowercase hex characters.>",
  "range_ticks": [
    {
      "Enum": [
        {
          "None": []
        },
        {
          "Some": [
            "<Int32>"
          ]
        }
      ]
    },
    {
      "Enum": [
        {
          "None": []
        },
        {
          "Some": [
            "<Int32>"
          ]
        }
      ]
    }
  ],
  "reward_since_creation": [
    "<String of size at most 74 containing an unsigned integer.>",
    "<String of size at most 74 containing an unsigned integer.>"
  ],
  "reward_since_last_withdraw": [
    "<String of size at most 74 containing an unsigned integer.>",
    "<String of size at most 74 containing an unsigned integer.>"
  ],
  "token_ids": [
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    },
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    }
  ]
}

Parameters
[
  "<UInt64>"
]
Errors
"<String>"
Return
[
  {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          {
            "balance": [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            "fee_level": "<UInt8>",
            "init_sqrt_price": "<String of size 16 containing lowercase hex characters.>",
            "net_liquidity": "<String of size 16 containing lowercase hex characters.>",
            "range_ticks": [
              {
                "Enum": [
                  {
                    "None": []
                  },
                  {
                    "Some": [
                      "<Int32>"
                    ]
                  }
                ]
              },
              {
                "Enum": [
                  {
                    "None": []
                  },
                  {
                    "Some": [
                      "<Int32>"
                    ]
                  }
                ]
              }
            ],
            "reward_since_creation": [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            "reward_since_last_withdraw": [
              "<String of size at most 74 containing an unsigned integer.>",
              "<String of size at most 74 containing an unsigned integer.>"
            ],
            "token_ids": [
              {
                "contract": {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                },
                "id": "<String with lowercase hex>"
              },
              {
                "contract": {
                  "index": "<UInt64>",
                  "subindex": "<UInt64>"
                },
                "id": "<String with lowercase hex>"
              }
            ]
          }
        ]
      }
    ]
  }
]

Parameters
{
  "amount": "<String of size at most 74 containing an unsigned integer.>",
  "data": "<String with lowercase hex>",
  "from": {
    "Enum": [
      {
        "Account": [
          "<AccountAddress>"
        ]
      },
      {
        "Contract": [
          {
            "index": "<UInt64>",
            "subindex": "<UInt64>"
          }
        ]
      }
    ]
  },
  "token_id": "<String with lowercase hex>"
}
Errors
"<String>"
Return
[]

Parameters
[
  {
    "Enum": [
      {
        "RegisterAccount": []
      },
      {
        "RegisterTokens": [
          [
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          ]
        ]
      },
      {
        "SwapExactIn": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "amount_limit": "<String of size at most 74 containing an unsigned integer.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "SwapExactOut": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "amount_limit": "<String of size at most 74 containing an unsigned integer.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "SwapToPrice": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "effective_price_limit": "<String of size 16 containing lowercase hex characters.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "Deposit": []
      },
      {
        "Withdraw": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          },
          "<String of size at most 74 containing an unsigned integer.>",
          {
            "Enum": [
              {
                "None": []
              },
              {
                "Some": [
                  [
                    "<String>",
                    "<String with lowercase hex>"
                  ]
                ]
              }
            ]
          }
        ]
      },
      {
        "OpenPosition": {
          "fee_rate": "<UInt16>",
          "position": {
            "amount_ranges": [
              {
                "max": "<String of size at most 74 containing an unsigned integer.>",
                "min": "<String of size at most 74 containing an unsigned integer.>"
              },
              {
                "max": "<String of size at most 74 containing an unsigned integer.>",
                "min": "<String of size at most 74 containing an unsigned integer.>"
              }
            ],
            "ticks_range": [
              {
                "Enum": [
                  {
                    "None": []
                  },
                  {
                    "Some": [
                      "<Int32>"
                    ]
                  }
                ]
              },
              {
                "Enum": [
                  {
                    "None": []
                  },
                  {
                    "Some": [
                      "<Int32>"
                    ]
                  }
                ]
              }
            ]
          },
          "tokens": [
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          ]
        }
      },
      {
        "ClosePosition": [
          "<UInt64>"
        ]
      },
      {
        "WithdrawFee": [
          "<UInt64>"
        ]
      }
    ]
  }
]
Errors
"<String>"
Return
[]

Parameters
[
  {
    "Enum": [
      {
        "RegisterAccount": []
      },
      {
        "RegisterTokens": [
          [
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          ]
        ]
      },
      {
        "SwapExactIn": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "amount_limit": "<String of size at most 74 containing an unsigned integer.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "SwapExactOut": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "amount_limit": "<String of size at most 74 containing an unsigned integer.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "SwapToPrice": [
          {
            "amount": {
              "Enum": [
                {
                  "None": []
                },
                {
                  "Some": [
                    "<String of size at most 74 containing an unsigned integer.>"
                  ]
                }
              ]
            },
            "effective_price_limit": "<String of size 16 containing lowercase hex characters.>",
            "token_in": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            "token_out": {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          }
        ]
      },
      {
        "Deposit": []
      },
      {
        "Withdraw": [
          {
            "contract": {
              "index": "<UInt64>",
              "subindex": "<UInt64>"
            },
            "id": "<String with lowercase hex>"
          },
          "<String of size at most 74 containing an unsigned integer.>",
          {
            "Enum": [
              {
                "None": []
              },
              {
                "Some": [
                  [
                    "<String>",
                    "<String with lowercase hex>"
                  ]
                ]
              }
            ]
          }
        ]
      },
      {
        "OpenPosition": {
          "fee_rate": "<UInt16>",
          "position": {
            "amount_ranges": [
              {
                "max": "<String of size at most 74 containing an unsigned integer.>",
                "min": "<String of size at most 74 containing an unsigned integer.>"
              },
              {
                "max": "<String of size at most 74 containing an unsigned integer.>",
                "min": "<String of size at most 74 containing an unsigned integer.>"
              }
            ],
            "ticks_range": [
              {
                "Enum": [
                  {
                    "None": []
                  },
                  {
                    "Some": [
                      "<Int32>"
                    ]
                  }
                ]
              },
              {
                "Enum": [
                  {
                    "None": []
                  },
                  {
                    "Some": [
                      "<Int32>"
                    ]
                  }
                ]
              }
            ]
          },
          "tokens": [
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            },
            {
              "contract": {
                "index": "<UInt64>",
                "subindex": "<UInt64>"
              },
              "id": "<String with lowercase hex>"
            }
          ]
        }
      },
      {
        "ClosePosition": [
          "<UInt64>"
        ]
      },
      {
        "WithdrawFee": [
          "<UInt64>"
        ]
      }
    ]
  }
]
Errors
"<String>"
Return
[]

Parameters
{
  "amount": "<String of size at most 74 containing an unsigned integer.>",
  "callback": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          [
            "<String>",
            [
              "<UInt8>"
            ]
          ]
        ]
      }
    ]
  },
  "token_id": {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
}
Errors
"<String>"
Return
[]

Parameters
[]
Errors
"<String>"
Return
[
  {
    "reserve_a": "<String of size at most 74 containing an unsigned integer.>",
    "reserve_b": "<String of size at most 74 containing an unsigned integer.>",
    "token_a": {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    },
    "token_b": {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    }
  }
]

Parameters
[]
Errors
"<String>"
Return
[]

Parameters
[]
Errors
"<String>"
Return
[]

Parameters
{
  "amount": "<String of size at most 74 containing an unsigned integer.>",
  "is_exact_in": "<Bool>",
  "slippage_tolerance_bp": "<UInt16>",
  "token_in": {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  },
  "token_out": {
    "contract": {
      "index": "<UInt64>",
      "subindex": "<UInt64>"
    },
    "id": "<String with lowercase hex>"
  }
}
Errors
"<String>"
Return
{
  "fee_in_spent_tok": "<String of size at most 74 containing an unsigned integer.>",
  "num_tick_crossings": "<UInt32>",
  "price_impact": {
    "denominator": "<String of size at most 74 containing an unsigned integer.>",
    "nominator": "<String of size at most 74 containing an unsigned integer.>"
  },
  "result": "<String of size at most 74 containing an unsigned integer.>",
  "result_bound": "<String of size at most 74 containing an unsigned integer.>",
  "swap_price": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          {
            "denominator": "<String of size at most 74 containing an unsigned integer.>",
            "nominator": "<String of size at most 74 containing an unsigned integer.>"
          }
        ]
      }
    ]
  },
  "swap_price_worst": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          {
            "denominator": "<String of size at most 74 containing an unsigned integer.>",
            "nominator": "<String of size at most 74 containing an unsigned integer.>"
          }
        ]
      }
    ]
  }
}

Parameters
{
  "amount_a": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<String of size at most 74 containing an unsigned integer.>"
        ]
      }
    ]
  },
  "amount_b": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          "<String of size at most 74 containing an unsigned integer.>"
        ]
      }
    ]
  },
  "fee_rate": "<UInt16>",
  "slippage_tolerance_bp": "<UInt16>",
  "ticks_range": [
    {
      "Enum": [
        {
          "None": []
        },
        {
          "Some": [
            "<Int32>"
          ]
        }
      ]
    },
    {
      "Enum": [
        {
          "None": []
        },
        {
          "Some": [
            "<Int32>"
          ]
        }
      ]
    }
  ],
  "tokens": [
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    },
    {
      "contract": {
        "index": "<UInt64>",
        "subindex": "<UInt64>"
      },
      "id": "<String with lowercase hex>"
    }
  ],
  "user_price": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          {
            "denominator": "<String of size at most 74 containing an unsigned integer.>",
            "nominator": "<String of size at most 74 containing an unsigned integer.>"
          }
        ]
      }
    ]
  }
}
Errors
"<String>"
Return
{
  "max_a": "<String of size at most 74 containing an unsigned integer.>",
  "max_b": "<String of size at most 74 containing an unsigned integer.>",
  "min_a": "<String of size at most 74 containing an unsigned integer.>",
  "min_b": "<String of size at most 74 containing an unsigned integer.>",
  "pool_exists": "<Bool>",
  "position_net_liquidity": {
    "denominator": "<String of size at most 74 containing an unsigned integer.>",
    "nominator": "<String of size at most 74 containing an unsigned integer.>"
  },
  "position_price": {
    "denominator": "<String of size at most 74 containing an unsigned integer.>",
    "nominator": "<String of size at most 74 containing an unsigned integer.>"
  },
  "spot_price": {
    "Enum": [
      {
        "None": []
      },
      {
        "Some": [
          {
            "denominator": "<String of size at most 74 containing an unsigned integer.>",
            "nominator": "<String of size at most 74 containing an unsigned integer.>"
          }
        ]
      }
    ]
  },
  "tx_cost": {
    "gas_cost_max": "<String of size at most 74 containing an unsigned integer.>",
    "storage_fee_max": "<String of size at most 74 containing an unsigned integer.>"
  }
}

Parameters
[]
Errors
"<String>"
Return
{
  "ft_transfer_call": "<String of size at most 74 containing an unsigned integer.>",
  "withdraw": "<String of size at most 74 containing an unsigned integer.>",
  "withdraw_fee": "<String of size at most 74 containing an unsigned integer.>"
}


Release: 2024.12
Support CCDExplorer.io Uptime Backend Status CCDExplorer is supported by AesirX - Decentralized Consent & Data Ownership