Token and NFT

Retrieve Account Information

This feature is available only after a successful login. It returns the account information for wallets used in the app.

GET /v1/account?userId={userId}&walletId={walletId} HTTP/1.1
Host: sdk.wepin.io
X-API-KEY: ${APP_KEY}
X-API-DOMAIN: {APP_DOMAIN}
X-SDK-TYPE: {platform}_rest_api
Content-Type: application/json
Authorization: Bearer ${access_token}

Request

Parameter

Name
Type
Description
Required

userId

String

userId obtained from the userInfo during the Login process.

O

walletId

String

Wallet ID received as a result of the Login.

O

Response

Success Response

Name
Type
Description

walletId

String

The user's wallet ID.

accounts

Account(Object) []

List of retrieved accounts (Account)

  • Account

    • accountId String

      • Unique identifier for the account

    • accountTokenId String (Optional)

      • Unique identifier for the token account. Returned only if it is a token account.

    • address String

      • Account address

    • addressPath String

      • Account address path

    • label String

      • Account label

    • balance String

      • Account balance

    • coinId Integer (Optional)

      • Identifier for the coin information of the account. Returned only for native coins.

    • name String

      • Name of the coin information of the account

    • network String

      • Network name of the account

    • symbol String

      • Symbol of the account

    • decimals Integer

      • Decimal value of the coin in the account

    • contract String (Optional)

      • Contract address of the token account. Returned only for token accounts.

    • iconUrl String

      • URL for the account's icon image

    • ids String

      • Identifier to retrieve the coin information of the account

Example


Refresh Account Balance

Refreshes the balance of the account. If the refresh is triggered by the user in the front-end service, it is recommended to implement UI/UX to prevent repeated requests within 1 minute.

Request

Parameter

Name
Type
Description
Required

accountId

String

accountId received from the account information retrieval

O

Response

Success Response

Name
Type
Description

balance

String

Account balance

decimals

Integer

Decimal value of the account

symbol

String

Symbol of the account

tokens

TokenBalance(Object) []

List of balances for the account's tokens (TokenBalance)

  • TokenBalance

    • balance String

      • Token account balance

    • decimals Integer

      • Decimal value of the token account

    • symbol String

      • Symbol of the token account

    • contract String

      • Contract address of the token account

Example


Retrieve NFT Information

This function is available only after a successful login. It returns the NFT information of the wallet used in the app.

Request

Parameter

Name
Type
Description
Required

userId

String

userId obtained from the userInfo during the Login process.

O

walletId

String

Wallet ID received as a result of the Login.

O

Response

Success Response

Name
Type
Description

nfts

NFT(Object) []

Retrieved NFT list (NFT)

  • NFT

    • id String

      • Unique identifier of the NFT

    • accountId String

      • Unique identifier of the account holding the NFT

    • name String

      • NFT name

    • description String

      • NFT description

    • tokenId String

    • externalLink String

      • NFT external link

    • imageUrl String

      • NFT image URL

    • quantity Integer

      • Number of NFTs

    • contentType Integer

      • Type of NFT content

      • 1 : image

      • 2 : video

    • contract Object

      • Information about the NFT contract (NFTContract)

    Example

  • NFTContract

    • address String

      • NFT Contract address

    • scheme Integer

      • NFT Contract Scheme

      • 1 : ERC721

      • 2 : ERC1155

    • description String

      • NFT Contract 설명

    • network String

      • Network

    • externalLink String

      • NFT contract external link

    • imageUrl String

      • NFT contract image URL

Refresh NFT Information

Refreshes the NFT information. If the refresh is triggered by a user's request in the front-end service, it is recommended to design the UI/UX to prevent repeated requests within 1 minute.

Request

Parameter

Name
Type
Description
Required

userId

String

userId obtained from the userInfo during the Login process.

O

walletId

String

Wallet ID received as a result of the Login.

O

Response

The response is identical to that of Retrieve NFT Information.

Last updated

Was this helpful?