REST Endpoints

Overview

1. Access URL

2. Request Format

The API supports both GET and POST methods. The only request parameter is p, and its format is JSON.

  • Example: https://api.paddlefi.com/api/dapp/querychainallinfo.do?p={}

3. Response Format

  • The response format is standardized as follows:

    jsonCopy code{"code":"0","msg":"OK","info":{}}

Parameter Name

Type

Description

code

string

0: Successful response, Non-0: Failed response

msg

string

Corresponding failure information for non-0 responses

info

json_object

Response data (varies by endpoint)


REST Endpoints

1. Create Lending/OTC Orders

  • Endpoint: /api/dapp/createorder.do

Request Parameters

Parameter Name

Required

Type

Description

chainname

Yes

string

Name of the blockchain

chainid

Yes

string

ID of the blockchain

useraddr

Yes

string

User address

orderfrom

Yes

string

Source platform for the order

orderinfo

Yes

json_object

Order object details

OrderInfo Structure (Loan/OTC)

Parameter Name

Required

Type

Description

maker

Yes

string

Order creator address

taker

Yes

string

Trader address, usually filled with 0x000...

asset

Yes

json_array

List of asset details

currency

Yes

json_array

List of fund details

deadline

Yes

string

Fundraising end time (for Loan orders)

duration

Yes

string

Loan repayment time after fundraising is successful (in seconds)

interestPerSecond

Yes

string

Interest generated per second

nonce

Yes

string

Nonce value obtained via contract interface ApproveTrade.nonces(address maker)

endTime

Yes

string

Repayment deadline, usually filled with 0 and updated automatically after successful fundraising

themselves

Yes

string

Signature (EIP712)

orderType

Yes

string

Type of the order: LOAN/OTC

Asset Structure Parameter Description

Parameter Name

Required

Type

Description

collection

Yes

string

Token address

assetClass

Yes

string

Token class (e.g., ERC20, ERC721, etc.)

amountOrID

Yes

string

Token quantity (ERC20) or ID (ERC721)

name

Yes

string

Token name

symbol

Yes

string

Token symbol

decimal

Yes

string

Token precision

Response Parameters

Parameter Name

Type

Description

warrants

string

Order ID

orderHash

string

Unique order hash

Response Example

jsonCopy code{
  "code": "0",
  "msg": "OK",
  "info": {
      "orderid":"1",
      "orderhash":"0xb3e6fed053a30c96d03861a60ff4a197cf62fa8588878a567913eb14a87fb723"
  }
}

2. Query Market Order List by Page

  • Endpoint: /api/dapp/querymarketorder.do

Request Parameters

Parameter Name

Required

Type

Description

page

No

string

Page number (default: 1)

count

No

string

Number of records per page (default: 100)

filter_ordertype

No

string

Filter by order type (LOAN, OTC)

filter_orderfrom

No

string

Filter by order source platform

filter_orderhash

No

string

Filter by order hash

filter_chainname

No

string

Filter by asset chain name (Bitlayer, Bsquare)

filter_chainid

No

string

Filter by chain ID

filter_assetname

No

string

Filter by asset name (USD Coin, Ether)

filter_currencyName

No

string

Filter by currency name (USD Coin, Ether)

filter_assetSymbol

No

string

Filter by asset symbol (USDT, ETH)

filter_currencySymbol

No

string

Filter by currency symbol (USDT, BTC)

filter_taker

No

string

Filter by order taker (can be specific address, 0x, or empty)

filter_status

No

string

Filter by order status (e.g., 0, 1, 2)

order_by

No

string

Sort by field and order type (e.g., createtime,desc)

Response Parameters

Parameter Name

Type

Description

count

string

Total number of matching orders

datas

json_array

List of matching orders

f_chain_name

string

Chain name

f_chain_id

string

Chain ID

f_create_time

string

Order creation time

f_create_user

string

Order creator (maker) address

f_order_hash

string

Unique order hash

f_order_from

string

Source platform of the order

f_trade_user

string

Taker (order trader) address

f_status

string

Order status

f_order_info

json_string

Order details (formatted as JSON)

f_trade_info

json_string

Trade details (formatted as JSON)

f_id

string

Order ID

f_isshow

string

Internal flag for whether to display on the front-end

f_update_time

string

Last update time

f_uuid

string

Internal flag for tracking updates


3. Paginated Query of Historical Orders

  • Endpoint: /api/dapp/queryhistoryorder.do

  • Request Parameters: Same as for querying the market order list.

  • Response Parameters: Same as for querying the market order list.


4. Paginated Query of Orders Created by User (Maker)

  • Endpoint: /api/dapp/queryusercreateorder.do

Request Parameters

Parameter Name

Required

Type

Description

useraddr

Yes

string

Address of the user whose orders will be queried

  • Response Parameters: Same as for querying the market order list.


5. Paginated Query of User's Completed Orders (Taker)

  • Endpoint: /api/dapp/queryusertradeorder.do

Request Parameters

Parameter Name

Required

Type

Description

useraddr

Yes

string

Address of the user whose completed orders will be queried

  • Response Parameters: Same as for querying the market order list

Last updated