TRS
1.1
Get the abbreviation list of supported token
GET the list of token
Request URL
index.ts / getBoinNamesList
Parameters
Return example
Return parameter description
Note
Returns a list of supported token abbreviations
1.2
Get the token price address
Get the price address by Token abbreviation
Requst URL
index.ts / getSelectBoinPubKeyByName
Parameters
Return example
Return parameter description
Note
The returned token address is string. It may need to be converted to PublicKey in future use. let publicKey = new PublicKey('7VJs....');
1.3
Get token abbreviation
Get token abbreviation from price address
Request URL
index.ts / getBoinNameByPublicKey
Parameters
Return example
Return parameter explain
Note
Token price address is string, PublickKey and string conversion, PublicKey uses toString()
### 1.4 ##### Add product
Launch token-pair products
Request URL
index.ts / addProduct
Parameters
Return example
Return result description
### 1.5 ##### Buy products
User Buy Products
Request URL
index.ts / buyTrs
Parameters
Return example
Return result description
Note
usdcPayPubKey的owner should be wallet address, otherwise the signature will fail.
### 1.6 ##### Apply for settlement
After product clearing, users can apply for settlement
Request URL
index.ts / settleApply
Parameters
Return example
Return result description
Note
productPubKey Product address must be the product purchased in orderPubKey order
### 1.7 ##### Get the product list
You can filter products by status. If the status is not transmitted, all products are queried by defaulte.
status 0:Raising and available for purchase 1:Established 2:Expired 3:Settled 4:Closed
Request URL
index.ts / getProductList
Parameters
Return example
Return parameter description
Note
Product Object see the Product field table in appendix.
### 1.8 ##### Get order list - Orders can be screened according to product address and user address - If only all orders of users are checked, pass the product address as an empty string ''. - If only checking all orders of products, pass user address as empty string ''
Request URL
index.ts / getOrderList
Parameters
Return example
Return example description
Note
-Order object see the Order field table in appendix
### 1.9 ##### Get account details
Returns account details based on the account address.
Request URL
index.ts / getAccountByKey
Parameters
Return example
Return parameter description
Note
-Type1 Returns an array of product objects; 2 Returns an array of order objects. 3 Returns an array of basic account information
Type 1 returns array of Product objects. 2 Returns array of Order objects. 3 Returns array of BaseData
### Appendix ##### Account structure information
Product
Order
BaseData
Last updated