Join our
Discord!
LogoLogo
SupraScan ExplorerStarKey WalletDiscord
MoveVM
  • Network
  • Oracles
  • Automation
  • SupraNova
  • Guides
MoveVM
  • Overview
  • Getting Started
    • Install Supra CLI with Docker
    • Create a Supra Account
    • Create a Move Package
      • Initialize a Package
      • Write a Module
      • Compile and Publish
      • Interact with a Package
    • Create a dApp with StarKey
  • Network Information
  • Token Standards
  • Learn Move 101
    • Getting Started with Move
    • Unsigned Integers in Move
    • Math Operations in Move
    • Using Vectors in Move
    • Reading Resource Data with borrow_global
    • Passing Data in Move: Value vs. Reference
    • Adding Elements with vector::push_back
    • Emitting Events with event::emit
  • Move Book
    • Getting Started
      • Modules and Scripts
      • Move Tutorial
    • Primitive Types
      • Integers
      • Bool
      • Address
      • Vector
      • Signer
      • References
      • Tuples and Unit
    • Basic Concepts
      • Local Variables and Scope
      • Equality
      • Abort and Assert
      • Conditionals
      • While, For, and Loop
      • Functions
      • Structs and Resources
      • Constants
      • Generics
      • Type Abilities
      • Uses and Aliases
      • Friends
      • Packages
      • Package Upgrades
      • Unit Tests
    • Global Storage
      • Structure
      • Operators
    • Reference
      • Standard Library
      • Coding Conventions
  • TypeScript SDK
    • Guides
      • Create Supra Accounts
      • Publish a Package
    • Documentation
    • Repository
  • Rest API
    • Mainnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Consensus
      • Events
      • Tables
    • Testnet
      • Accounts
      • Faucet
      • Transactions
      • Block
      • View
      • Events
      • Tables
  • Developer Resources
    • Supra Dapp Templates
    • Supra Move VS Code Extension
  • Links
    • Supra DevHub
    • SupraScan Block Explorer
    • StarKey Wallet
    • Live Data Feeds
    • Whitepapers
    • Security Audits
    • Supra's Official GitHub
Powered by GitBook
On this page
  1. Rest API
  2. Testnet

Accounts

PreviousTestnetNextFaucet

Accounts Api

Deprecated

Get account v1

get

Fetch account info contains auth key & sequence number for the account

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Responses
200
Account information
application/json
Responseone of
nullOptional
or
get
GET /rpc/v1/accounts/{address} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Account information

No content

Deprecated

Get coin transactions v1

get

List of finalized coin withdraw/deposit transactions relevant to the move account. Return max 100 transactions per request. It includes both transactions sent from and received by the account.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startinteger ยท u-int64Optional

The cursor that the search should start from. The cursor for a given transaction can be derived by adding its index (where indexes start from zero) in the block in which it became finalized to the timestamp of the block.

During a paginated query, the cursor returned in the previous page should be used as the starting cursor of the next page.

If provided, return :count of transactions starting from this cursor in ascending order. If not provided, return :count of most recent transactions in descending order.

Responses
200
List of *finalized* transactions sent from and received by the move account.
application/json
get
GET /rpc/v1/accounts/{address}/coin_transactions HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of finalized transactions sent from and received by the move account.

{
  "record": [
    {
      "authenticator": {},
      "block_header": null,
      "hash": "text",
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {},
      "output": {
        "Dkg": "Success"
      },
      "status": "Success"
    }
  ],
  "cursor": 1
}
Deprecated

Get account modules v1

get

Get account modules by address

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startstringOptional

Cursor specifying where to start for pagination. Use the cursor returned by the API when making the next request.

Responses
200
Account module list
application/json
Responseone of
or
get
GET /rpc/v1/accounts/{address}/modules HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Account module list

{
  "Resources": {
    "resource": [
      []
    ],
    "cursor": [
      1
    ]
  }
}
Deprecated

Get account module v1

get

Retrieves an individual module from a given account.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
module_namestringRequired

Name of module to retrieve e.g. coin

Responses
200
View account module by Move module name
application/json
Responseone of
nullOptional
or
get
GET /rpc/v1/accounts/{address}/modules/{module_name} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

View account module by Move module name

No content

Deprecated

Get account resources v1

get

Get account resources by address

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startstringOptional

Cursor specifying where to start for pagination. Use the cursor returned by the API when making the next request.

Responses
200
Account resource list
application/json
Responseone of
or
get
GET /rpc/v1/accounts/{address}/resources HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Account resource list

{
  "Resources": {
    "resource": [
      []
    ],
    "cursor": [
      1
    ]
  }
}
Deprecated

Get account resource v1

get

View account resource by Move type

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
resource_typestringRequired

Name of struct to retrieve e.g. 0x1::account::Account

Example: 0x1::coin::CoinStore<0x1::supra_coin::SupraCoin>Pattern: ^0x[0-9a-zA-Z:_<>]+$
Responses
200
View account resource by Move Struct type
application/json
Responseone of
nullOptional
or
get
GET /rpc/v1/accounts/{address}/resources/{resource_type} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

View account resource by Move Struct type

No content

Deprecated

Get account transactions v1

get

List of finalized transactions sent by the move account. Return max 100 transactions per request.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startinteger ยท u-int64Optional

Starting sequence number. If provided, return :count of transactions starting from this sequence number in ascending order. If not provided, return :count of most recent transactions in descending order.

Responses
200
List of transactions from the move account.
application/json
get
GET /rpc/v1/accounts/{address}/transactions HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of transactions from the move account.

{
  "record": [
    {
      "authenticator": {},
      "block_header": null,
      "hash": "text",
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {},
      "output": {
        "Dkg": "Success"
      },
      "status": "Success"
    }
  ]
}

Get account v2

get

Fetch account info contains auth key & sequence number for the account

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Responses
200
Account information
application/json
get
GET /rpc/v2/accounts/{address} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Account information

{
  "sequence_number": 1,
  "authentication_key": "text"
}

Get coin transactions v2

get

List of finalized coin withdraw/deposit transactions relevant to the move account. Return max 100 transactions per request. It includes both transactions sent from and received by the account.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startinteger ยท u-int64Optional

The cursor that the search should start from. The cursor for a given transaction can be derived by adding its index (where indexes start from zero) in the block in which it became finalized to the timestamp of the block.

During a paginated query, the cursor returned in the previous page should be used as the starting cursor of the next page.

If provided, return :count of transactions starting from this cursor in ascending order. If not provided, return :count of most recent transactions in descending order.

Responses
200
List of *finalized* transactions sent from and received by the move account.
application/json
get
GET /rpc/v2/accounts/{address}/coin_transactions HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of finalized transactions sent from and received by the move account.

{
  "record": [
    {
      "authenticator": {},
      "block_header": null,
      "hash": "text",
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {},
      "output": {
        "Dkg": "Success"
      },
      "status": "Success"
    }
  ],
  "cursor": 1
}

Get account modules v2

get

Retrieves all account modules' bytecode for a given account.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startstringOptional

Cursor specifying where to start for pagination. Use the cursor returned by the API when making the next request.

Responses
200
account module list
application/json
get
GET /rpc/v2/accounts/{address}/modules HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

account module list

{
  "modules": [
    {
      "bytecode": "text",
      "abi": {
        "address": "text",
        "name": {},
        "friends": {},
        "exposed_functions": {},
        "structs": {}
      }
    }
  ],
  "cursor": null
}

Get account module v2

get

Retrieves an individual module from a given account.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
module_namestringRequired

Name of module to retrieve e.g. coin

Responses
200
View account module by Move module name
application/json
get
GET /rpc/v2/accounts/{address}/modules/{module_name} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

View account module by Move module name

{
  "bytecode": "text",
  "abi": {
    "address": "text",
    "name": {},
    "friends": {},
    "exposed_functions": {},
    "structs": {}
  }
}

Get account resources v2

get

Get account resources by address

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startstringOptional

Cursor specifying where to start for pagination. Use the cursor returned by the API when making the next request.

Responses
200
Account resource list
application/json
get
GET /rpc/v2/accounts/{address}/resources HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Account resource list

{
  "resources": [
    {
      "type": "text",
      "data": {}
    }
  ],
  "cursor": "text"
}

Get account resource v2

get

View account resource by Move type

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
resource_typestringRequired

Name of struct to retrieve e.g. 0x1::account::Account

Example: 0x1::coin::CoinStore<0x1::supra_coin::SupraCoin>Pattern: ^0x[0-9a-zA-Z:_<>]+$
Responses
200
View account resource by Move Struct type
application/json
get
GET /rpc/v2/accounts/{address}/resources/{resource_type} HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

View account resource by Move Struct type

{
  "type": "text",
  "data": {}
}

Get account transactions v2

get

List of finalized transactions sent by the move account. Return max 100 transactions per request.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startinteger ยท u-int64Optional

Starting sequence number. If provided, return :count of transactions starting from this sequence number in ascending order. If not provided, return :count of most recent transactions in descending order.

Responses
200
List of transactions from the move account.
application/json
get
GET /rpc/v2/accounts/{address}/transactions HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of transactions from the move account.

{
  "record": [
    {
      "authenticator": {},
      "block_header": null,
      "hash": "text",
      "header": {
        "chain_id": 1,
        "expiration_timestamp": {
          "timestamp": 1
        },
        "sender": "text",
        "sequence_number": 1,
        "gas_unit_price": 1,
        "max_gas_amount": 1
      },
      "payload": {},
      "output": {
        "Dkg": "Success"
      },
      "status": "Success"
    }
  ]
}

Get account auto-transaction v3

get

List of finalized automated transactions based on the automation tasks registered by the move account. Return max 100 transactions per request.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

block_heightinteger ยท u-int64Optional

Starting block height (inclusive). Optional.

If not specified the lookup will start from the latest block or from thespecified cursor.

During a paginated query, the cursor returned in the X_SUPRA_CURSOR response header should be specified as the cursor parameter of the request for the next page. Note that the ascending flag value should be the same for consecutive queries.

cursorstringOptional

The cursor to start the query from. Optional.

If not specified, the lookup will be done based on the block_height parameter value. Note: If both cursor and block_height are specified then cursor has precedence.

During a paginated query, the cursor returned in the X_SUPRA_CURSOR response header should be specified as the cursor parameter of the request for the next page. Note that the ascending flag value should be the same for consecutive queries.

ascendingbooleanOptional

Flag indicating order of lookup.

If true the data will be provided starting the specified position in ascending order. If false, the data will be provided starting the specified position in descending order. If no position is specified, then the latest count available data will be provided with the first item as cursor in the response.

Responses
200
List of automated transactions of the move account.
application/json
get
GET /rpc/v3/accounts/{address}/automated_transactions HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of automated transactions of the move account.

[
  {
    "authenticator": {},
    "block_header": null,
    "hash": "text",
    "header": {
      "chain_id": 1,
      "expiration_timestamp": {
        "timestamp": 1
      },
      "sender": "text",
      "sequence_number": 1,
      "gas_unit_price": 1,
      "max_gas_amount": 1
    },
    "payload": {},
    "output": {
      "Dkg": "Success"
    },
    "status": "Success",
    "txn_type": "user"
  }
]

Get coin transactions v3

get

List of finalized coin withdraw/deposit transactions relevant to the move account. Return max 100 transactions per request.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startinteger ยท u-int64Optional

The cursor that the search should start from. The cursor for a given transaction can be derived by adding its index (where indexes start from zero) in the block in which it became finalized to the timestamp of the block.

During a paginated query, the cursor returned in the previous page should be used as the starting cursor of the next page.

If provided, return :count of transactions starting from this cursor in ascending order. If not provided, return :count of most recent transactions in descending order.

Responses
200
List of *finalized* transactions sent from and received by the move account.
application/json
get
GET /rpc/v3/accounts/{address}/coin_transactions HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of finalized transactions sent from and received by the move account.

[
  {
    "authenticator": {},
    "block_header": null,
    "hash": "text",
    "header": {
      "chain_id": 1,
      "expiration_timestamp": {
        "timestamp": 1
      },
      "sender": "text",
      "sequence_number": 1,
      "gas_unit_price": 1,
      "max_gas_amount": 1
    },
    "payload": {},
    "output": {
      "Dkg": "Success"
    },
    "status": "Success",
    "txn_type": "user"
  }
]

Get account modules v3

get

Retrieves all account modules' bytecode for a given account.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startstringOptional

Cursor specifying where to start for pagination. Use the cursor returned by the API when making the next request.

Responses
200
Account module list
application/json
get
GET /rpc/v3/accounts/{address}/modules HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Account module list

[
  {
    "bytecode": "text",
    "abi": {
      "address": "text",
      "name": {},
      "friends": {},
      "exposed_functions": {},
      "structs": {}
    }
  }
]

Get account resources v3

get

Retrieves all account resources for a given account.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startstringOptional

Cursor specifying where to start for pagination. Use the cursor returned by the API when making the next request.

Responses
200
Account resource list
application/json
get
GET /rpc/v3/accounts/{address}/resources HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

Account resource list

[
  {
    "type": "text",
    "data": {}
  }
]

Get account transactions v3

get

List of finalized transactions sent by the move account. Return max 100 transactions per request.

Path parameters
addressstringRequired

Address of account with or without a 0x prefix

Example: 0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
Query parameters
countintegerOptional

Maximum number of items to return. Default is 20.

startinteger ยท u-int64Optional

Starting sequence number. If provided, return :count of transactions starting from this sequence number in ascending order. If not provided, return :count of most recent transactions in descending order.

Responses
200
List of transactions from the move account.
application/json
get
GET /rpc/v3/accounts/{address}/transactions HTTP/1.1
Host: rpc-testnet.supra.com
Accept: */*
200

List of transactions from the move account.

[
  {
    "authenticator": {},
    "block_header": null,
    "hash": "text",
    "header": {
      "chain_id": 1,
      "expiration_timestamp": {
        "timestamp": 1
      },
      "sender": "text",
      "sequence_number": 1,
      "gas_unit_price": 1,
      "max_gas_amount": 1
    },
    "payload": {},
    "output": {
      "Dkg": "Success"
    },
    "status": "Success",
    "txn_type": "user"
  }
]
  • GETGet account v1
  • GETGet coin transactions v1
  • GETGet account modules v1
  • GETGet account module v1
  • GETGet account resources v1
  • GETGet account resource v1
  • GETGet account transactions v1
  • GETGet account v2
  • GETGet coin transactions v2
  • GETGet account modules v2
  • GETGet account module v2
  • GETGet account resources v2
  • GETGet account resource v2
  • GETGet account transactions v2
  • GETGet account auto-transaction v3
  • GETGet coin transactions v3
  • GETGet account modules v3
  • GETGet account resources v3
  • GETGet account transactions v3