From cf1610a7b7165dd833a34d0c7a000852b9fc3e8a Mon Sep 17 00:00:00 2001 From: Tenancio Date: Tue, 20 Feb 2024 12:58:56 +0000 Subject: [PATCH] add contract endpoint docs --- index.html | 28 +++++++++++++++++----------- openapi.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index 2a0279f..7b8fa49 100644 --- a/index.html +++ b/index.html @@ -337,7 +337,7 @@ -

Transaction logs for the pool

Response samples

Content type
application/json
{
  • "transactions": [
    ]
}

Get the available tokens to deposit

query Parameters
symbol
required
string

Response samples

Content type
application/json
{
  • "transactions": [
    ]
}

Get the contract for a liquidity pool

query Parameters
symbol
required
string

the symbol of the pool

+

Responses

Response samples

Content type
application/json
{
  • "contract": {
    }
}

Get the available tokens to deposit

query Parameters
symbol
required
string

The symbol of the pool to deposit into.

pkh
required
string

The user's public key hash

Responses

Response samples

Content type
application/json
{
  • "assets": {
    }
}

Liquidity

Response samples

Content type
application/json
{
  • "assets": {
    }
}

Liquidity

Liquidity Operations

Create a transaction to deposit tokens to a liquidity pool

Request Body schema: application/json
required
symbol
required
string

The pool symbol

@@ -501,7 +507,7 @@ " class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS sc-ckdEwu LxEPk">

Pool not found

Request samples

Content type
application/json
{
  • "symbol": "string",
  • "ada": 0,
  • "token_amount": 0,
  • "pkh": "string"
}

Response samples

Content type
application/json
{
  • "tx": "string"
}

Create a transaction to withdraw tokens from a liquidity pool

Request Body schema: application/json
required
symbol
required
string

Request samples

Content type
application/json
{
  • "symbol": "string",
  • "ada": 0,
  • "token_amount": 0,
  • "pkh": "string"
}

Response samples

Content type
application/json
{
  • "tx": "string"
}

Create a transaction to withdraw tokens from a liquidity pool

Request Body schema: application/json
required
symbol
required
string

The pool symbol

lp_amount
required
number

The amount of lp tokens to be exchanged

@@ -513,7 +519,7 @@ " class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS sc-ckdEwu LxEPk">

Pool not found

Request samples

Content type
application/json
{
  • "symbol": "string",
  • "lp_amount": 0,
  • "pkh": "string"
}

Response samples

Content type
application/json
{
  • "tx": "string"
}

Tx

Request samples

Content type
application/json
{
  • "symbol": "string",
  • "lp_amount": 0,
  • "pkh": "string"
}

Response samples

Content type
application/json
{
  • "tx": "string"
}

Tx

Transaction operations

Build a transaction for depositing tokens to receive FPT

Request Body schema: application/json
required
token_policy
required
string

The policy of the token being locked

@@ -525,7 +531,7 @@ " class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS sc-ckdEwu LxEPk">

An Unsigned Transaction

Request samples

Content type
application/json
{
  • "token_policy": "string",
  • "symbol": "string",
  • "lock_assets": [
    ]
}

Response samples

Content type
application/json
{
  • "tx": "string"
}

Build a transaction for withdrawing tokens using FPT

Request Body schema: application/json
token_policy
required
string

Request samples

Content type
application/json
{
  • "token_policy": "string",
  • "symbol": "string",
  • "lock_assets": [
    ]
}

Response samples

Content type
application/json
{
  • "tx": "string"
}

Build a transaction for withdrawing tokens using FPT

Request Body schema: application/json
token_policy
required
string

The policy of the tokens being unlocked

symbol
required
string

The symbol of the project

@@ -535,7 +541,7 @@ " class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS sc-ckdEwu LxEPk">

An Unsigned Transaction

Request samples

Content type
application/json
{
  • "token_policy": "string",
  • "symbol": "string",
  • "unlock_assets": [
    ]
}

Response samples

Content type
application/json
{
  • "tx": "string"
}

Sumbit a transaction to the blockchain

Request Body schema: application/json
required
type
required
string

Request samples

Content type
application/json
{
  • "token_policy": "string",
  • "symbol": "string",
  • "unlock_assets": [
    ]
}

Response samples

Content type
application/json
{
  • "tx": "string"
}

Sumbit a transaction to the blockchain

Request Body schema: application/json
required
type
required
string

The type of transaction

tx
required
string

The transaction body

@@ -547,13 +553,13 @@ " class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS sc-ckdEwu LxEPk">

A Tx Hash

Request samples

Content type
application/json
{
  • "type": "string",
  • "tx": "string",
  • "witness": "string",
  • "pkh": "string"
}

Response samples

Content type
application/json
{
  • "txHash": "string"
}

/previewLiquidityDeposit

path Parameters
symbol
required
string

Request samples

Content type
application/json
{
  • "type": "string",
  • "tx": "string",
  • "witness": "string",
  • "pkh": "string"
}

Response samples

Content type
application/json
{
  • "txHash": "string"
}

/previewLiquidityDeposit

path Parameters
symbol
required
string

The symbol to retrieve transactions for

query Parameters
token_amount
integer

the number of tokens to deposit

Responses

Response samples

Content type
application/json
{
  • "share": 0,
  • "required_ada": 0,
  • "price": 0
}

/previewLiquidityWithdraw

path Parameters
symbol
required
string

Response samples

Content type
application/json
{
  • "share": 0,
  • "required_ada": 0,
  • "price": 0
}

/previewLiquidityWithdraw

path Parameters
symbol
required
string

The symbol to retrieve transactions for

query Parameters
amount
integer

the number of LPs to cash in

@@ -561,9 +567,9 @@ " class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

The user's pub key hash

Responses

Response samples

Content type
application/json
{
  • "pooled_ada": 0,
  • "pooled_tokens": 0,
  • "share": 0,
  • "ada_received": 0,
  • "tokens_received": 0,
  • "price": 0
}
+

Response samples

Content type
application/json
{
  • "pooled_ada": 0,
  • "pooled_tokens": 0,
  • "share": 0,
  • "ada_received": 0,
  • "tokens_received": 0,
  • "price": 0
}