Submit internal NFT transfer

Rate limit: 5 every second

API Overview


HTTP method

POST

Path

/api/v3/nft/transfer

Summary

api.submitNftTransfer.notes

API description


HTTP Header

Field Type Required Description Example
X-API-KEY string Y ApiKey "HlkcGxbqBeaF76j4rvPaOasyfPwnkQ
6B6DQ6THZWbvrAGxzEdulXQvOKLrRW
ZLnN"

Request parameters

Field Type Required Description Example
exchange string Y exchange address "1"
fromAccountId integer Y payer account ID 1
fromAddress string Y payer account address "0xABCD"
toAccountId integer Y payee account ID 1
toAddress string Y payer account address "0xCDEF"
token NftToken
Amount
Info
Y token to be transfer "{tokenId: 0, amount: 1000000}"
maxFee Token
Amount
Info
Y maximum fee of the transfer "{tokenId: 0, amount: 1000000}"
storageId integer Y offchain Id 1
validUntil integer Y Timestamp for order to become invalid 1598431481
counterFactualInfo Counter
Factual
Info
N Counter factual wallet extra info to verify L1 ecdsa signature. "{walletFacto
ry: 0xABCD, walletOwner: 0xABCD, walletSalt: 1234}"
eddsaSignature string N eddsa signature "0xeb14773e8a
07d19bc4fe56
e36d041dcb00
2652f7e92160
deaf5e6bf21e
05c7a9eb1477
3e8a07d19bc4
fe56e36d041d
cb002652f7e9
2160deaf5e6b
f21e05c7a9eb
14773e8a07d1
9bc4fe56e36d
041dcb002652
f7e92160deaf
5e6bf21e05c7
a9"
ecdsaSignature string N ecdsa signature "0xccf0a141fc
e2dc5cbbd4f8
02c52220e9e2
ce260e86704d
6258603eb346
eefe2d4a4500
05c362b223b2
8402d087f706
5ea5eee03145
31adf6a580fc
e64c25dca81c
02"
hashApproved string N An approved hash string which was already submitted on eth mainnet "0xf7c9323511
86c3a9053f31
3eefa16209c0
18f7f1dba8aa
8ca7100400f7
c31085"
memo string N transfer memo "Air Drop"
payPayeeUpdateAccount boolean N field.OriginTransferRequestV3.payPayeeUpdateAccount "false"

Request example

HTTP
CURL
POST https://api3.loopring.io/api/v3/nft/transfer HTTP/1.1
Host: api3.loopring.io
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: zh,en;q=0.9
X-API-KEY: sra1aavfa
Content-Type: application/json

{
  "exchange" : "1",
  "fromAccountId" : 1,
  "fromAddress" : "0xABCD",
  "toAccountId" : 1,
  "toAddress" : "0xCDEF",
  "token" : {
    "tokenId" : 0,
    "nftData" : "0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085",
    "amount" : "1"
  },
  "maxFee" : {
    "tokenId" : 0,
    "amount" : "1"
  },
  "storageId" : 1,
  "validUntil" : 1598431481,
  "counterFactualInfo" : {
    "walletFactory" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
    "walletOwner" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
    "walletSalt" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
  },
  "eddsaSignature" : "0xeb14773e8a07d19bc4fe56e36d041dcb002652f7e92160deaf5e6bf21e05c7a9eb14773e8a07d19bc4fe56e36d041dcb002652f7e92160deaf5e6bf21e05c7a9eb14773e8a07d19bc4fe56e36d041dcb002652f7e92160deaf5e6bf21e05c7a9",
  "ecdsaSignature" : "0xccf0a141fce2dc5cbbd4f802c52220e9e2ce260e86704d6258603eb346eefe2d4a450005c362b223b28402d087f7065ea5eee0314531adf6a580fce64c25dca81c02",
  "hashApproved" : "0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085",
  "memo" : "Air Drop",
  "payPayeeUpdateAccount" : false
}
curl -X POST -H "X-API-KEY:sra1aavfa" -H "Content-Type:application/json" https://api3.loopring.io/api/v3/nft/transfer -d \
'{
  "exchange" : "1",
  "fromAccountId" : 1,
  "fromAddress" : "0xABCD",
  "toAccountId" : 1,
  "toAddress" : "0xCDEF",
  "token" : {
    "tokenId" : 0,
    "nftData" : "0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085",
    "amount" : "1"
  },
  "maxFee" : {
    "tokenId" : 0,
    "amount" : "1"
  },
  "storageId" : 1,
  "validUntil" : 1598431481,
  "counterFactualInfo" : {
    "walletFactory" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
    "walletOwner" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd",
    "walletSalt" : "0xbbbbca6a901c926f240b89eacb641d8aec7aeafd"
  },
  "eddsaSignature" : "0xeb14773e8a07d19bc4fe56e36d041dcb002652f7e92160deaf5e6bf21e05c7a9eb14773e8a07d19bc4fe56e36d041dcb002652f7e92160deaf5e6bf21e05c7a9eb14773e8a07d19bc4fe56e36d041dcb002652f7e92160deaf5e6bf21e05c7a9",
  "ecdsaSignature" : "0xccf0a141fce2dc5cbbd4f802c52220e9e2ce260e86704d6258603eb346eefe2d4a450005c362b223b28402d087f7065ea5eee0314531adf6a580fce64c25dca81c02",
  "hashApproved" : "0xf7c932351186c3a9053f313eefa16209c018f7f1dba8aa8ca7100400f7c31085",
  "memo" : "Air Drop",
  "payPayeeUpdateAccount" : false
}'

Response fields

Field Type Required Description Example
hash string Y The order hash identifier set by the user at the time of submission "0x1d923ca783
4dc90484fa2e
b611f0f0bc7e
741bb107007e
bea19ba8caea
b4f9d3"
status string Y Whether the order was successfully submitted or not, please note, user may query after a while to get real process status, as most offchain requests are async processed
Allowable : ['received', 'processing', 'processed', 'failed']
"received"
isIdempotent boolean Y Idempotent of submit order response, submit same order again when order was UNKNOWN or WAIT_FREEZE_BALANCE in relayer, idempotent will be true
Allowable : [True, False]
"true"

Response example

{
  "hash" : "0x1d923ca7834dc90484fa2eb611f0f0bc7e741bb107007ebea19ba8caeab4f9d3",
  "status" : "received",
  "isIdempotent" : true
}

Status code

Value Description
100000 Unknown error
100001 Invalid argument
102001 Exchange ID is incorrect
102021 Nonce is invalid
102022 Transfer sender is invalid
102023 Transfer receiver is invalid
102024 Fee token is unsupported
102025 Transfer token isnt consistent with fee token

Model


NftTokenAmountInfo

Wrapper object used to describe a NFT token associated with a certain quantity.

Field Type Required Description Example
tokenId integer Y The Loopring's NFT token identifier. 0
nftData string N The Loopring's NFT token data identifier which is a hash string of NFT token address and NFT_ID "0xf7c9323511
86c3a9053f31
3eefa16209c0
18f7f1dba8aa
8ca7100400f7
c31085"
amount string Y The amount of the NFT token "1"

TokenAmountInfo

Wrapper object used to describe a token associated with a certain quantity.

Field Type Required Description Example
tokenId integer Y The Loopring's NFT token identifier. 0
amount string Y The amount of the NFT token "1"

CounterFactualInfo

Field Type Required Description Example
walletFactory string Y Counter factual wallet factory contract address "0xbbbbca6a90
1c926f240b89
eacb641d8aec
7aeafd"
walletOwner string Y Counter factual wallet owner address, NOT the wallet address "0xbbbbca6a90
1c926f240b89
eacb641d8aec
7aeafd"
walletSalt string Y Salt to generate address from owner & other related info "0xbbbbca6a90
1c926f240b89
eacb641d8aec
7aeafd"

results matching ""

    No results matching ""