v1

latestOpenAPI 3.1.02026-07-1410027.2 KB
Offer

Make new offer

Make a new offer to either a single NFT or a whole collection.Signature index:[expiry,lender,amount,repayment,nftAddress,tokenId,duration,erc20Address,itemType,size,counter]

post/v3/offer/make

Request body

expiryinteger required

Expiration timestamp of the offer (second). Must be current timestamp + range in [900, 604800]

lenderstring required

Lender's address

amountstring required

The amount of ETH to lend (wei)

repaymentstring required

Repayment (wei). The value is limited by its calculated APR (the APR must be between 1%~300%)

nftAddressstring required

Contract address of the NFT

tokenIdstring required

Token id of the NFT. When making a collection offer, set the field to an '340282366920938463463374607431768211455' which means'0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'

durationinteger required

Loan duration (second), allowed values are [86400, 259200, 604800, 1209600, 2592000, 5184000, 7776000], indicating [1, 3, 7, 14, 30, 60, 90]days

erc20Addressstring required

Loan currency address. Use wETH's contract address for now.

createTimeinteger required

The current timestamp

signaturestring required

Offer signature. Read Generate offer signature for more details

itemTypestring required

NFT type, 0: ERC-721, 1: ERC-1155

{"stackTrail":"paths:/v3/offer/make:post:requestBody:content:application/json:schema:properties:size","oasType":"schema","type":"unknown","description":"Offer size"}
counterstring required

Get counter from '/v3/chain/getUserCounter'

Response

200

codeinteger
msgstring
tinteger

Example response

{
  "data": {
    "offerId": "111123",
    "optType": "insert"
  },
  "code": 200,
  "msg": "ok",
  "t": 1559204889719
}