C# .NET SDK Reference

Moralis

Moralis

Contents

AbiItem type

Namespace

Moralis.Abi

Summary

Defines an Abi Entry item.

Anonymous property

Summary

Indicates if event or function is anonymous.

Inputs property

Summary

A set of input parameters

Name property

Summary

Name of the function or event.

Outputs property

Summary

A set of putput parameters.

StateMutability property

Summary

Type of function (view, etc.)

Type property

Summary

Indicates if item is a function or event

AbiParameter type

Namespace

Moralis.Abi

Components property

Summary

Used for tuple types

Indexed property

Summary

True if the field is part of the log’s topics, false if it one of the log’s data segment.

InternalType property

Summary

the canonical type of the parameter

Name property

Summary

The parameter name

Type property

Summary

The canonical type of the parameter

AbiTools type

Namespace

Moralis.Abi

Summary

Tools used to process contract ABI

JsonToAbiObject(json) method

Summary

Converts an ABI Json string to an ABI object.

Returns

List of AbiItem

Parameters
NameTypeDescription
jsonSystem.String

AccountApi type

Namespace

Moralis.SolanaApi.Api

AccountApi type

Namespace

Moralis.Web3Api.Api

Summary

Represents a collection of functions to interact with the API endpoints

# ctor(apiClient) constructor

Summary

Initializes a new instance of the AccountApi class.

Returns
Parameters
NameTypeDescription
apiClientMoralis.Network.ApiClientan instance of ApiClient (optional)

# ctor() constructor

Summary

Initializes a new instance of the AccountApi class.

Returns
Parameters

This constructor has no parameters.

# ctor(apiClient) constructor

Summary

Initializes a new instance of the AccountApi class.

Returns
Parameters
NameTypeDescription
apiClientMoralis.Network.ApiClientan instance of ApiClient (optional)

# ctor() constructor

Summary

Initializes a new instance of the AccountApi class.

Returns
Parameters

This constructor has no parameters.

ApiClient property

Summary

Gets or sets the API client.

ApiClient property

Summary

Gets or sets the API client.

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

GetNFTTransfers(address,chain,format,direction,offset,limit) method

Summary

Gets the transfers of the tokens matching the given parameters

Returns

Returns a collection of NFT transfer

Parameters
NameTypeDescription
addressSystem.StringThe sender or recepient of the transfer
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
directionSystem.StringThe transfer direction
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetNFTs(address,chain,format,offset,limit) method

Summary

Gets NFTs owned by the given address

  • The response will include status [SYNCED/SYNCING] based on the contracts being indexed.
  • Use the token_address param to get results for a specific contract only
  • Note results will include all indexed NFTs
  • Any request which includes the token_address param will start the indexing process for that NFT collection the very first time it is requested
Returns

Returns a collection of nft owners

Parameters
NameTypeDescription
addressSystem.StringThe owner of a given token
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetNFTsForContract(address,tokenAddress,chain,format,offset,limit) method

Summary

Gets NFTs owned by the given address

  • Use the token_address param to get results for a specific contract only
  • Note results will include all indexed NFTs
  • Any request which includes the token_address param will start the indexing process for that NFT collection the very first time it is requested
Returns

Returns a collection of nft owners

Parameters
NameTypeDescription
addressSystem.StringThe owner of a given token
tokenAddressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetNativeBalance(address,chain,providerUrl,toBlock) method

Summary

Gets native balance for a specific address

Returns

Returns native balance for a specific address

Parameters
NameTypeDescription
addressSystem.StringThe address for which the native balance will be checked
chainMoralis.Web3Api.Models.ChainListThe chain to query
providerUrlSystem.Stringweb3 provider url to user when using local dev chain
toBlockSystem.Nullable{System.Decimal}The block number on which the balances should be checked

GetTokenBalances(address,chain,subdomain,toBlock) method

Summary

Gets token balances for a specific address

Returns

Returns token balances for a specific address

Parameters
NameTypeDescription
addressSystem.StringThe address for which token balances will be checked
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
toBlockSystem.Nullable{System.Decimal}The block number on which the balances should be checked

GetTokenTransfers(address,chain,subdomain,fromBlock,toBlock,fromDate,toDate,offset,limit) method

Summary

Gets ERC20 token transactions in descending order based on block number

Returns

Returns a collection of token transactions.

Parameters
NameTypeDescription
addressSystem.Stringaddress
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlockSystem.StringThe minimum block number from where to get the transactions
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | The maximum block number from where to get the transactions.
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | fromDate | System.Nullable{System.Int32} | The date from where to get the transactions (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get the transactions to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | offset | System.String | offset |
    | limit | System.Nullable{System.Int32} | limit |

GetTransactions(address,chain,subdomain,fromBlock,toBlock,fromDate,toDate,offset,limit) method

Summary

Gets native transactions in descending order based on block number

Returns

Returns a collection of native transactions.

Parameters
NameTypeDescription
addressSystem.Stringaddress
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlockSystem.StringThe minimum block number from where to get the transactions
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | The maximum block number from where to get the transactions.
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | fromDate | System.Nullable{System.Int32} | The date from where to get the transactions (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get the transactions to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | offset | System.String | offset |
    | limit | System.Nullable{System.Int32} | limit |

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

ApiClient type

Namespace

Moralis.Network

Summary

API client is mainly responible for making the HTTP call to the API backend.

# ctor(basePath) constructor

Summary

Initializes a new instance of the ApiClient class.

Parameters
NameTypeDescription
basePathSystem.StringThe base path.

BasePath property

Summary

Gets or sets the base path.

DefaultHeader property

Summary

Gets the default header.

AddDefaultHeader(key,value) method

Summary

Add default header.

Parameters
NameTypeDescription
keySystem.StringHeader field name.
valueSystem.StringHeader field value.

Base64Encode(text) method

Summary

Encode string in base64 format.

Returns

Encoded string.

Parameters
NameTypeDescription
textSystem.StringString to be encoded.

CallApi(path,method,queryParams,postBody,headerParams,formParams,fileParams,authSettings) method

Summary

Makes the HTTP request (Sync).

Returns

HttpResponseMessage

Parameters

ConvertType(fromObject,toObject) method

Summary

Dynamically cast the object into target type.

Returns

Casted object

Parameters
NameTypeDescription
fromObjectSystem.ObjectObject to be casted
toObjectSystem.TypeTarget type

Deserialize(content,type,headers) method

Summary

Deserialize the JSON string into a proper object.

Returns

Object representation of the JSON string.

Parameters
NameTypeDescription
contentSystem.StringHTTP body (e.g. string, JSON).
typeSystem.TypeObject type.
headersSystem.Collections.Generic.IList{Moralis.Network.Parameter}HTTP headers.

EscapeString(str) method

Summary

Escape string (url-encoded).

Returns

Escaped string.

Parameters
NameTypeDescription
strSystem.StringString to be escaped.

GetApiKeyWithPrefix(apiKeyIdentifier) method

Summary

Get the API key with prefix.

Returns

API key with prefix.

Parameters
NameTypeDescription
apiKeyIdentifierSystem.StringAPI key identifier (authentication scheme).

ParameterToFile(name,stream) method

Summary

Create FileParameter based on Stream.

Returns

FileParameter.

Parameters
NameTypeDescription
nameSystem.StringParameter name.
streamSystem.IO.StreamInput stream.

ParameterToHex(val) method

Summary

Convert a number to a HEX string.

Returns

Hex string.

Parameters
NameTypeDescription
valSystem.Int64Value to convert

ParameterToString(obj) method

Summary

If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime.
If parameter is a list of string, join the list with ",".
Otherwise just return the string.

Returns

Formatted string.

Parameters
NameTypeDescription
objSystem.ObjectThe parameter (header, path, query, form).

Serialize(obj) method

Summary

Serialize an object into JSON string.

Returns

JSON string.

Parameters
NameTypeDescription
objSystem.ObjectObject.

UpdateParamsForAuth(queryParams,headerParams,authSettings) method

Summary

Update parameters based on authentication.

Parameters
NameTypeDescription
queryParamsSystem.Collections.Generic.Dictionary{System.String,System.String}Query parameters.
headerParamsSystem.Collections.Generic.Dictionary{System.String,System.String}Header parameters.
authSettingsSystem.String[]Authentication settings.

ApiException type

Namespace

Moralis.Network

Summary

API Exception

# ctor() constructor

Summary

Initializes a new instance of the ApiException class.

Parameters

This constructor has no parameters.

# ctor(errorCode,message) constructor

Summary

Initializes a new instance of the ApiException class.

Parameters
NameTypeDescription
errorCodeSystem.Int32HTTP status code.
messageSystem.StringError message.

# ctor(errorCode,message,errorContent) constructor

Summary

Initializes a new instance of the ApiException class.

Parameters
NameTypeDescription
errorCodeSystem.Int32HTTP status code.
messageSystem.StringError message.
errorContentSystem.ObjectError content.

ErrorCode property

Summary

Gets or sets the error code (HTTP status code)

ErrorContent property

Summary

Gets or sets the error content (body json object)

AuthApiClient type

Namespace

Moralis.AuthApi.Client

Summary

Provides public exposure of the Authentication Api Endpoint.

# ctor() constructor

Summary

Default constructor.

Parameters

This constructor has no parameters.

# ctor(serverUrl) constructor

Summary

Initialize client using just server url.

Parameters
NameTypeDescription
serverUrlSystem.String

AuthEndpoint property

Summary

Target Authentication Endpoint.

IsInitialized property

Summary

Indicates that the client has been initialized.

Initialize(serverUrl) method

Summary

Initialize the client using serverUrl. If serverUrl is null default is used.
ApiKey is passed via Configuration signleton.

Parameters
NameTypeDescription
serverUrlSystem.String

AuthenticationApi type

Namespace

Moralis.AuthApi.Api

Summary

Defines a client endpoint the enables application to execute Moralis Authentication Api operations.

# ctor(apiClient) constructor

Summary

Initializes a new instance of the AuthenticationApi class.

Parameters
NameTypeDescription
apiClientMoralis.Network.ApiClientan instance of ApiClient (optional)

# ctor() constructor

Summary

Initializes a new instance of the AuthenticationApi class.

Parameters

This constructor has no parameters.

ApiClient property

Summary

Gets or sets the API client.

Challenge(request,network) method

Summary

Calls the Moralis Authentication Api Challenge operation to generate an authentication message.

Returns

ChallengeResponseDto

Parameters
Exceptions

CompleteChallenge(request,network) method

Summary

After a message is signed this operation is used to call the Moralis Authentication Challenge Verify operation to validate the signature.

Returns

CompleteChallengeResponseDto

Parameters
Exceptions

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

HealthCheck() method

Summary

Exposes the HealthCheck operation of the Moralis Authentication API which enables client applications a way to determine that the Moralis Authentrication Api is available.

Returns

HealthCheckResponse

Parameters

This method has no parameters.

Exceptions

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

BetaApi type

Namespace

Moralis.StreamsApi.Api

# ctor(apiClient) constructor

Summary

Initializes a new instance of the HistoryApi class.

Parameters
NameTypeDescription
apiClientMoralis.Network.ApiClientan instance of ApiClient (optional)

# ctor() constructor

Summary

Initializes a new instance of the HistoryApi class.

Parameters

This constructor has no parameters.

ApiClient property

Summary

Gets or sets the API client.

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

GetStats(limit,cursor) method

Summary

Retrieves history.

Returns

LogResponse

Parameters
NameTypeDescription
limitM:Moralis.StreamsApi.Api.BetaApi.GetStatsdouble
Exceptions

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

BigDecimal type

Namespace

Moralis.Unit

Summary

Arbitrary precision Decimal.
All operations are exact, except for division.
Division never determines more digits than the given precision of 50.

# ctor(bigDecimal,alwaysTruncate) constructor

Summary

Constructor

Parameters
NameTypeDescription
bigDecimalMoralis.Unit.BigDecimal
alwaysTruncateSystem.Boolean

# ctor(value,alwaysTruncate) constructor

Summary

Constructor

Parameters
NameTypeDescription
valueSystem.Decimal
alwaysTruncateSystem.Boolean

# ctor(mantissa,exponent,alwaysTruncate) constructor

Summary
Parameters
NameTypeDescription
mantissaSystem.Numerics.BigInteger
exponentSystem.Int32The number of decimal units for example (-18). A positive value will be normalised as 10 ^
exponent
alwaysTruncateSystem.BooleanSpecifies whether the significant digits should be truncated to the given precision after
each operation.

Precision constants

Summary

Sets the maximum precision of division operations.
If AlwaysTruncate is set to true all operations are affected.

Exponent property

Summary

A number denoting the power to which that number, symbol, or expression is to be raised.

Mantissa property

Summary

The significant digits of a floating-point number or a number in scientific notation

AlignExponent() method

Summary

Returns the mantissa of value, aligned to the exponent of reference.
Assumes the exponent of value is larger than of value.

Parameters

This method has no parameters.

CompareTo(obj) method

Summary

Defines a general comparison operator.

Returns

int

Parameters
NameTypeDescription
objSystem.Object
Exceptions

CompareTo(other) method

Summary

Defines a comparison operator to compare against other BigDecimals.

Returns

int

Parameters
NameTypeDescription
otherMoralis.Unit.BigDecimal

Equals(other) method

Summary

Provides equality operator against other BigDecimal objects.

Returns

bool

Parameters
NameTypeDescription
otherMoralis.Unit.BigDecimal

Equals(obj) method

Summary

Provides a general equality operation

Returns

bool

Parameters
NameTypeDescription
objSystem.Object

Exp(exponent) method

Summary

Applies exponent to BigDecimal.

Returns

BigDecimal

Parameters
NameTypeDescription
exponentSystem.Doubledouble

Floor() method

Summary

Truncate the number, removing all decimal digits.

Returns

The truncated number

Parameters

This method has no parameters.

GetHashCode() method

Summary

Provides GetHashCode operation.

Returns

int

Parameters

This method has no parameters.

NormaliseExponentBiggerThanZero() method

Summary

Uses Mantissa to normalize when exponent is greater than zero.

Parameters

This method has no parameters.

Normalize() method

Summary

Removes trailing zeros on the mantissa

Parameters

This method has no parameters.

Parse(value) method

Summary

Provide a way to convert valid numeric strings to BigDecimal

Returns

BigDecimal

Parameters
NameTypeDescription
valueSystem.Stringstring

Pow(basis,exponent) method

Summary

Provide a Power operation

Returns

BigDecimal

Parameters
NameTypeDescription
basisSystem.Doubledouble
exponentSystem.Doubledouble

RoundAwayFromZero() method

Summary

Rounds the number to the specified amount of significant digits.
Midpoints (like 0.5 or -0.5) are rounded away from 0 (e.g. to 1 and -1 respectively).

Parameters

This method has no parameters.

ToString() method

Summary

Provides a ToString operation

Returns

string

Parameters

This method has no parameters.

ToString(formatSpecifier,format) method

Summary

Formated string

Returns

string

Parameters
NameTypeDescription
formatSpecifierSystem.Stringstring
formatSystem.IFormatProviderIFormatProvider
Exceptions

Truncate() method

Summary

Truncate the number to the given precision by removing the least significant digits.

Returns

The truncated number

Parameters

This method has no parameters.

op_Addition(left,right) method

Summary

Defines addtion operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
leftMoralis.Unit.BigDecimalBigDecimal
rightMoralis.Unit.BigDecimalBigDecimal

op_Decrement(value) method

Summary

Defines decrement operation for BigDecimal value.

Returns

BigDecimal

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimalBigDecimal

op_Division(dividend,divisor) method

Summary

Defines division operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
dividendMoralis.Unit.BigDecimalBigDecimal
divisorMoralis.Unit.BigDecimalBigDecimal

op_Equality(left,right) method

Summary

Defines equality operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
leftMoralis.Unit.BigDecimalBigDecimal
rightMoralis.Unit.BigDecimalBigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to double - possible data loss

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimal)~System.DoubleBigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to float - possible data loss

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimal)~System.SingleBigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to decimal - possible data loss

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimal)~System.DecimalBigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to int - possible data loss

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimal)~System.Int32BigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to uint - possible data loss

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimal)~System.UInt32BigDecimal

op_GreaterThan(left,right) method

Summary

Defines greater than operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
leftMoralis.Unit.BigDecimalBigDecimal
rightMoralis.Unit.BigDecimalBigDecimal

op_GreaterThanOrEqual(value) method

Summary

Defines greater than or equal to operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimalBigDecimal

op_Implicit(value) method

Summary

Convert int to BigDecimal

Parameters
NameTypeDescription
valueSystem.Int32)~Moralis.Unit.BigDecimal~Moralis.Unit.BigDecimal 'System.Int32)~Moralis.Unit.BigDecimal')int

op_Implicit(value) method

Summary

Convert BigInteger to BigDecimal

Parameters
NameTypeDescription
valueSystem.Numerics.BigInteger)~Moralis.Unit.BigDecimal~Moralis.Unit.BigDecimal 'System.Numerics.BigInteger)~Moralis.Unit.BigDecimal')BigInteger

op_Implicit(value) method

Summary

Convert double to BigDecimal

Parameters
NameTypeDescription
valueSystem.Double)~Moralis.Unit.BigDecimal~Moralis.Unit.BigDecimal 'System.Double)~Moralis.Unit.BigDecimal')double

op_Implicit(value) method

Summary

Convert decimal to BigDecimal

Parameters
NameTypeDescription
valueSystem.Decimal)~Moralis.Unit.BigDecimal~Moralis.Unit.BigDecimal 'System.Decimal)~Moralis.Unit.BigDecimal')decimal

op_Increment(value) method

Summary

Defines increment operation for BigDecimal value.

Returns

BigDecimal

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimalBigDecimal

op_Inequality(left,right) method

Summary

Defines not equal operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
leftMoralis.Unit.BigDecimalBigDecimal
rightMoralis.Unit.BigDecimalBigDecimal

op_LessThan(left,right) method

Summary

Defines less than operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
leftMoralis.Unit.BigDecimalBigDecimal
rightMoralis.Unit.BigDecimalBigDecimal

op_LessThanOrEqual(left,right) method

Summary

Defines less than or equal to operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
leftMoralis.Unit.BigDecimalBigDecimal
rightMoralis.Unit.BigDecimalBigDecimal

op_Multiply(left,right) method

Summary

Defines multiplication operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
leftMoralis.Unit.BigDecimalBigDecimal
rightMoralis.Unit.BigDecimalBigDecimal

op_Subtraction(left,right) method

Summary

Defines subtraction operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
leftMoralis.Unit.BigDecimalBigDecimal
rightMoralis.Unit.BigDecimalBigDecimal

op_UnaryNegation(value) method

Summary

Defines subtraction operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimalBigDecimal

op_UnaryPlus(value) method

Summary

Defines addition operation for two BigDecimal values.

Returns

BigDecimal

Parameters
NameTypeDescription
valueMoralis.Unit.BigDecimalBigDecimal

BigDecimalFormatter type

Namespace

Moralis.Unit

Summary

Provides functions for formating number

BigIntegerExtensions type

Namespace

Moralis.Unit

Summary

Provides functions for BigInteger

NumberOfDigits(value) method

Summary

Number of digits in a BigInteger value.

Returns

int

Parameters
NameTypeDescription
valueSystem.Numerics.BigIntegerBigInteger

ParseInvariant(value) method

Summary

Parse an invariat value.

Returns

BigInteger

Parameters
NameTypeDescription
valueSystem.Stringstring
Exceptions

Block type

Namespace

Moralis.Web3Api.Models

Difficulty property

Summary

The difficulty of the block
example: 7253857437305950

ExtraData property

Summary

example: 0x65746865726d696e652d6575726f70652d7765737433

GasLimit property

Summary

The gas limit
example: 14977947

GasUsed property

Summary

The gas used
example: 14964688

Hash property

Summary

The block hash
example: 0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171

LogsBloom property

Summary

example: 0xdde5fc46c5d8bcbd58207bc9f267bf43298e23791a326ff02661e99790da9996b3e0dd912c0b8202d389d282c56e4d11eb2dec4898a32b6b165f1f4cae6aa0079498eab50293f3b8defbf6af11bb75f0408a563ddfc26a3323d1ff5f9849e95d5f034d88a757ddea032c75c00708c9ff34d2207f997cc7d93fd1fa160a6bfaf62a54e31f9fe67ab95752106ba9d185bfdc9b6dc3e17427f844ee74e5c09b17b83ad6e8fc7360f5c7c3e4e1939e77a6374bee57d1fa6b2322b11ad56ad0398302de9b26d6fbfe414aa416bff141fad9d4af6aea19322e47595e342cd377403f417dfd396ab5f151095a5535f51cbc34a40ce9648927b7d1d72ab9daf253e31daf

Miner property

Summary

The address of the miner
example: 0xea674fdde714fd979de3edf0f56aa9716b898ec8

Nonce property

Summary

The nonce
example: 0xedeb2d8fd2b2bdec

Number property

Summary

The block number
example: 12386788

ParentHash property

Summary

The block hash of the parent block
example: 0x011d1fc45839de975cc55d758943f9f1d204f80a90eb631f3bf064b80d53e045

ReceiptsRoot property

Summary

example: 0x7cf43d7e837284f036cf92c56973f5e27bdd253ca46168fa195a6b07fa719f23

Sha3Uncles property

Summary

example: 0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347

Size property

Summary

The block size
example: 61271

StateRoot property

Summary

example: 0x49e3bfe7b618e27fde8fa08884803a8458b502c6534af69873a3cc926a7c724b

Timestamp property

Summary

The block timestamp
example: 5/7/2021 11:08:35 AM

TotalDifficulty property

Summary

The total difficulty
example: 24325637817906576196890

TransactionCount property

Summary

The number of transactions in the block
example: 252

Transactions property

Summary

The transactions in the block

TransactionsRoot property

Summary

example: 0xe4c7bf3aff7ad07f9e80d57f7189f0252592fee6321c2a9bd9b09b6ce0690d27

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

BlockDate type

Namespace

Moralis.Web3Api.Models

Block property

Summary

The blocknumber
example: 9193266

Date property

Summary

The date of the block
example: 12/31/2019 7:00:00 PM

Timestamp property

Summary

The timestamp of the block
example: 1577836811

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

BlockTransaction type

Namespace

Moralis.Web3Api.Models

BlockHash property

Summary

The hash of the block
example: 0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171

BlockNumber property

Summary

The block number
example: 12386788

BlockTimestamp property

Summary

The block timestamp
example: 5/7/2021 11:08:35 AM

FromAddress property

Summary

The from address
example: 0x267be1c1d684f78cb4f6a176c4911b741e4ffdc0

Gas property

Summary

example: 30000

GasPrice property

Summary

The gas price
example: 52500000000

Hash property

Summary

The hash of the transaction
example: 0x1ed85b3757a6d31d01a4d6677fc52fd3911d649a0af21fe5ca3f886b153773ed

Input property

Summary

example: 0x

Logs property

Summary

The logs of the transaction

Nonce property

Summary

The nonce
example: 1848059

ReceiptContractAddress property

Summary

ReceiptCumulativeGasUsed property

Summary

example: 4923073

ReceiptGasUsed property

Summary

example: 21000

ReceiptRoot property

Summary

ReceiptStatus property

Summary

example: 1

ToAddress property

Summary

The to address
example: 0x003dde3494f30d861d063232c6a8c04394b686ff

TransactionIndex property

Summary

example: 108

Value property

Summary

The value sent
example: 115580000000000000

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

ChainEntry type

Namespace

Moralis.Models

Summary

Provides detail around a supported EVM chain.

ChainId constants

Summary

Chain Id as integer

Decimals constants

Summary

Number of decimals in the currency.

EnumValue constants

Summary

Chain Id as Enum value.

Name constants

Summary

Name of the chain.

Symbol constants

Summary

Native currency's symbol.

ChainNetworkType type

Namespace

Moralis.AuthApi.Models

Summary

Blockchain network types

evm constants

Summary

Ethereum Virtual Machine (EVM) compatible networks

solana constants

Summary

Solana compatible networks.

ChallengeRequestDto type

Namespace

Moralis.AuthApi.Models

Summary

Request object for the Challenge operation.

Address property

Summary

The Ethereum address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.

ChainId property

Summary

The EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts MUST be resolved.

Domain property

Summary

The RFC 3986 authority that is requesting the signing

ExpirationTime property

Summary

The ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.

NotBefore property

Summary

The ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.

Resources property

Summary

A list of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by "\n- " where \n is the byte 0x0a.

Statement property

Summary

A human-readable ASCII assertion that the user will sign, and it must not contain '\n' (the byte 0x0a).

Timeout property

Summary

Time is seconds at which point this request becomes invalid.

Uri property

Summary

An RFC 3986 URI referring to the resource that is the subject of the signing (as in the subject of a claim).

ChallengeResponseDto type

Namespace

Moralis.AuthApi.Models

Summary

Respopnse returned by the Challenge operation.

Id property

Summary

Internal identifier

Message property

Summary

Message meant to be signed.

ProfileId property

Summary

Profile Id generated by the Moralis Authentication API.

CompleteChallengeRequestDto type

Namespace

Moralis.AuthApi.Models

Summary

Request used to call the Challenge verify operation of the Authentication Api.

Message property

Summary

Original message that was generated to be signed.

Signature property

Summary

The crypotgraphic signature of the message.

CompleteChallengeResponseDto type

Namespace

Moralis.AuthApi.Models

Summary

The response returned by the Challenge Verify when the a signature/message is verified successfully.

Address property

Summary

The Ethereum address performing the signing conformant to capitalization encoded checksum specified in EIP-55 where applicable.

ChainId property

Summary

The EIP-155 Chain ID to which the session is bound, and the network where Contract Accounts MUST be resolved.

Domain property

Summary

The RFC 3986 authority that is requesting the signing

ExpirationTime property

Summary

The ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid.

Id property

Summary

Internal Identifier

Nonce property

Summary

Nonce used to make message unique

NotBefore property

Summary

The ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid.

ProfileId property

Summary

Moralis Profile Id

Resources property

Summary

A list of information or references to information the user wishes to have resolved as part of authentication by the relying party. They are expressed as RFC 3986 URIs separated by "\n- " where \n is the byte 0x0a.

Statement property

Summary

A human-readable ASCII assertion that the user will sign, and it must not contain '\n' (the byte 0x0a).

Uri property

Summary

An RFC 3986 URI referring to the resource that is the subject of the signing (as in the subject of a claim).

Version property

Summary

Api version

Component type

Namespace

Moralis.Abi

Summary

Defines a component type used for tuple types.

Components property

Summary

Used for tuple types

Name property

Summary

The parameter name

Type property

Summary

The canonical type of the parameter

Configuration type

Namespace

Moralis.Network

Summary

Represents a set of configuration settings

ApiKey constants

Summary

Gets or sets the API key based on the authentication name.

ApiKeyPrefix constants

Summary

Gets or sets the prefix (e.g. Token) of the API key based on the authentication name.

DefaultApiClient constants

Summary

Gets or sets the default API client for making HTTP calls.

Version constants

Summary

Version of the package.

DateTimeFormat property

Summary

Gets or sets the the date time format used when serializing in the ApiClient
By default, it's set to ISO 8601 - "o", for others see:
https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx
and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx
No validation is done to ensure that the string you're providing is valid

Password property

Summary

Gets or sets the password (HTTP basic authentication).

TempFolderPath property

Summary

Gets or sets the temporary folder path to store the files downloaded from the server.

Username property

Summary

Gets or sets the username (HTTP basic authentication).

ToDebugReport() method

Summary

Returns a string with essential information for debugging.

Parameters

This method has no parameters.

DataFormat type

Namespace

Moralis.Network

Summary

Expected / supported format

DatabaseStatus type

Namespace

Moralis.AuthApi.Models

Summary

Helathcheck DB status

Redis property

Summary

Redis entry response.

DatabaseStatusEntry type

Namespace

Moralis.AuthApi.Models

Summary

Healthcheck DB status for specific instance.

Status property

Summary

Status of the server.

DefiApi type

Namespace

Moralis.Web3Api.Api

Summary

Represents a collection of functions to interact with the API endpoints

# ctor(apiClient) constructor

Summary

Initializes a new instance of the DefiApi class.

Returns
Parameters
NameTypeDescription
apiClientMoralis.Network.ApiClientan instance of ApiClient (optional)

# ctor() constructor

Summary

Initializes a new instance of the DefiApi class.

Returns
Parameters

This constructor has no parameters.

ApiClient property

Summary

Gets or sets the API client.

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

GetPairAddress(exchange,token0Address,token1Address,chain,toBlock,toDate) method

Summary

Fetches and returns pair data of the provided token0+token1 combination.
The token0 and token1 options are interchangable (ie. there is no different outcome in "token0=WETH and token1=USDT" or "token0=USDT and token1=WETH")

Returns

Returns the pair address of the two tokens

Parameters
NameTypeDescription
exchangeSystem.StringThe factory name or address of the token exchange
token0AddressSystem.StringToken0 address
token1AddressSystem.StringToken1 address
chainMoralis.Web3Api.Models.ChainListThe chain to query
toBlockSystem.StringTo get the reserves at this block number
toDateSystem.StringGet the reserves to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |

GetPairReserves(pairAddress,chain,toBlock,toDate,providerUrl) method

Summary

Get the liquidity reserves for a given pair address

Returns

Returns the pair reserves

Parameters
NameTypeDescription
pairAddressSystem.StringLiquidity pair address
chainMoralis.Web3Api.Models.ChainListThe chain to query
toBlockSystem.StringTo get the reserves at this block number
toDateSystem.StringGet the reserves to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | providerUrl | System.String | web3 provider url to user when using local dev chain |

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

Ens type

Namespace

Moralis.Web3Api.Models

Name property

Summary

Resolved ENS address
example: Vitalik.eth

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Erc20Allowance type

Namespace

Moralis.Web3Api.Models

Allowance property

Summary

The allowance

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Erc20Metadata type

Namespace

Moralis.Web3Api.Models

Address property

Summary

The address of the token contract
example: 0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09

BlockNumber property

Summary

Decimals property

Summary

The number of decimals on of the token
example: 18

Logo property

Summary

The logo of the token
example: https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png

LogoHash property

Summary

The logo hash
example: ee7aa2cdf100649a3521a082116258e862e6971261a39b5cd4e4354fcccbc54d

Name property

Summary

The name of the token Contract
example: Kylin Network

Symbol property

Summary

The symbol of the NFT contract
example: KYL

Thumbnail property

Summary

The thumbnail of the logo
example: https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png

Validated property

Summary

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Erc20Price type

Namespace

Moralis.Web3Api.Models

ExchangeAddress property

Summary

The address of the exchange used to calculate the price
example: 0x1f98431c8ad98523631ae4a59f267346ea31f984

ExchangeName property

Summary

The name of the exchange used for calculating the price
example: Uniswap v3

NativePrice property

Summary

UsdPrice property

Summary

format: double
The price in USD for the token
example: 19.722370676

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Erc20TokenBalance type

Namespace

Moralis.Web3Api.Models

Balance property

Summary

Timestamp of when the contract was last synced with the node
example: 123456789

Decimals property

Summary

The number of decimals on of the token
example: 18

Logo property

Summary

The logo of the token
example: https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c.png

Name property

Summary

The name of the token Contract
example: Kylin Network

Symbol property

Summary

The symbol of the NFT contract
example: KYL

Thumbnail property

Summary

The thumbnail of the logo
example: https://cdn.moralis.io/eth/0x67b6d479c7bb412c54e03dca8e1bc6740ce6b99c_thumb.png

TokenAddress property

Summary

The address of the token contract
example: 0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09

RawBalance() method

Summary

Used by base class to access the raw WEI string value.

Returns
Parameters

This method has no parameters.

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Erc20Transaction type

Namespace

Moralis.Web3Api.Models

Address property

Summary

The address of the token
example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

BlockHash property

Summary

The block hash
example: 0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86

BlockNumber property

Summary

The block number
example: 12526958

BlockTimestamp property

Summary

The block timestamp
example: 4/2/2021 10:07:54 AM

FromAddress property

Summary

The sender
example: 0xd4a3BebD824189481FC45363602b83C9c7e9cbDf

ToAddress property

Summary

The recipient
example: 0x62AED87d21Ad0F3cdE4D147Fdcc9245401Af0044

TransactionHash property

Summary

The transaction hash
example: 0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09

Value property

Summary

The value that was transfered (in wei)
example: 650000000000000000

RawBalance() method

Summary

Used by base class to access the raw WEI string value.

Returns
Parameters

This method has no parameters.

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Erc20TransactionCollection type

Namespace

Moralis.Web3Api.Models

Page property

Summary

The page of the current result
example: 2

PageSize property

Summary

The number of results per page
example: 100

Result property

Summary

Total property

Summary

The total number of matches for this query
example: 2000

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Erc721Metadata type

Namespace

Moralis.Web3Api.Models

Name property

Summary

The name of the token Contract
example: Kylin Network

Symbol property

Summary

The symbol of the NFT contract
example: KYL

TokenUri property

Summary

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

EthUnit type

Namespace

Moralis.Unit.UnitConversion

Summary

Define Ethereum divisional units.

Extensions type

Namespace

Moralis.Web3Api.Models

GetChainEntry(target) method

Summary

Returns the ChainEntry associated with the ChainId of the target.

Returns
Parameters

ToBigNumber(val) method

Summary

Converts a numeric string to a BigIntegrer. If val is not a valid integer
result is 0

Returns

BigInteger

Parameters
NameTypeDescription
valSystem.StringMust be numeric

TokenSymbol(target) method

Summary

Returns the symbol for the target Chain Id

Returns

string

Parameters
NameTypeDescription
targetMoralis.Web3Api.Models.ChainList

FileParameter type

Namespace

Moralis.Network

Summary

Defines a parameter representing a file stream for nwetwork transfer.

# ctor() constructor

Summary

Default constructor.

Parameters

This constructor has no parameters.

ContentLength property

Summary

Length of the data stream.

ContentType property

Summary

Data ContentType

FileName property

Summary

Name of the file being transfered.

Name property

Summary

Parameter name

Writer property

Summary

Stream Writer object.

Create(name,data,filename,contentType) method

Summary

Creates a FileParameter

Returns

FileParameter

Parameters
NameTypeDescription
nameSystem.String
dataSystem.Byte[]
filenameSystem.String
contentTypeSystem.String

Create(name,data,filename) method

Summary

Creates a FileParameter.

Returns

FileParameter

Parameters
NameTypeDescription
nameSystem.String
dataSystem.Byte[]
filenameSystem.String

Create(name,writer,contentLength,fileName,contentType) method

Summary

Creates a FileParameter

Returns

FileParameter

Parameters
NameTypeDescription
nameSystem.String
writerSystem.Action{System.IO.Stream}
contentLengthSystem.Int64
fileNameSystem.String
contentTypeSystem.String

FormattingExtensions type

Namespace

Moralis.Unit

Summary

Defines formatting utility functions.

ToStringInvariant``1() method

Summary

Converts formattable value to string in a culture-independent way.

Parameters

This method has no parameters.

HealthCheckResponse type

Namespace

Moralis.AuthApi.Models

Summary

Authentication Api Server Healthcheck response.

Details property

Summary

Database status details.

Error property

Summary

Error detail if healthcheck fails.

Info property

Summary

Server information if successfull

Status property

Summary

Overall status of the endpoint.

HistoricalNftTransfer type

Namespace

Moralis.Web3Api.Models

Address property

Summary

The address of the token
example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

Amounts property

Summary

The amounts that were transfered

BlockHash property

Summary

The block hash
example: 0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86

BlockNumber property

Summary

The block number
example: 12526958

BlockTimestamp property

Summary

The block timestamp
example: 4/2/2021 10:07:54 AM

ContractType property

Summary

They contract type of the transfer
example: ERC721

FromAddress property

Summary

The sender
example: 0xd4a3BebD824189481FC45363602b83C9c7e9cbDf

ToAddress property

Summary

The recipient
example: 0x62AED87d21Ad0F3cdE4D147Fdcc9245401Af0044

TokenIds property

Summary

The token ids of the tokens that were transfered

TransactionHash property

Summary

The transaction hash
example: 0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

HistoryApi type

Namespace

Moralis.StreamsApi.Api

# ctor(apiClient) constructor

Summary

Initializes a new instance of the HistoryApi class.

Parameters
NameTypeDescription
apiClientMoralis.Network.ApiClientan instance of ApiClient (optional)

# ctor() constructor

Summary

Initializes a new instance of the HistoryApi class.

Parameters

This constructor has no parameters.

ApiClient property

Summary

Gets or sets the API client.

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

GetHistory(limit,cursor) method

Summary

Retrieves history.

Returns

LogResponse

Parameters
NameTypeDescription
limitSystem.Int64double
cursorSystem.Stringstring
Exceptions

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

IAccountApi type

Namespace

Moralis.Web3Api.Interfaces

Summary

Represents a collection of functions to interact with the API endpoints

GetNFTTransfers(address,chain,format,direction,offset,limit) method

Summary

Gets the transfers of the tokens matching the given parameters

Returns

Returns a collection of NFT transfer

Parameters
NameTypeDescription
addressSystem.StringThe sender or recepient of the transfer
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
directionSystem.StringThe transfer direction
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetNFTs(address,chain,format,offset,limit) method

Summary

Gets NFTs owned by the given address

  • The response will include status [SYNCED/SYNCING] based on the contracts being indexed.
  • Use the token_address param to get results for a specific contract only
  • Note results will include all indexed NFTs
  • Any request which includes the token_address param will start the indexing process for that NFT collection the very first time it is requested
Returns

Returns a collection of nft owners

Parameters
NameTypeDescription
addressSystem.StringThe owner of a given token
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetNFTsForContract(address,tokenAddress,chain,format,offset,limit) method

Summary

Gets NFTs owned by the given address

  • Use the token_address param to get results for a specific contract only
  • Note results will include all indexed NFTs
  • Any request which includes the token_address param will start the indexing process for that NFT collection the very first time it is requested
Returns

Returns a collection of nft owners

Parameters
NameTypeDescription
addressSystem.StringThe owner of a given token
tokenAddressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetNativeBalance(address,chain,providerUrl,toBlock) method

Summary

Gets native balance for a specific address

Returns

Returns native balance for a specific address

Parameters
NameTypeDescription
addressSystem.StringThe address for which the native balance will be checked
chainMoralis.Web3Api.Models.ChainListThe chain to query
providerUrlSystem.Stringweb3 provider url to user when using local dev chain
toBlockSystem.Nullable{System.Decimal}The block number on which the balances should be checked

GetTokenBalances(address,chain,subdomain,toBlock) method

Summary

Gets token balances for a specific address

Returns

Returns token balances for a specific address

Parameters
NameTypeDescription
addressSystem.StringThe address for which token balances will be checked
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
toBlockSystem.Nullable{System.Decimal}The block number on which the balances should be checked

GetTokenTransfers(address,chain,subdomain,fromBlock,toBlock,fromDate,toDate,offset,limit) method

Summary

Gets ERC20 token transactions in descending order based on block number

Returns

Returns a collection of token transactions.

Parameters
NameTypeDescription
addressSystem.Stringaddress
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlockSystem.StringThe minimum block number from where to get the transactions
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | The maximum block number from where to get the transactions.
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | fromDate | System.Nullable{System.Int32} | The date from where to get the transactions (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get the transactions to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | offset | System.String | offset |
    | limit | System.Nullable{System.Int32} | limit |

GetTransactions(address,chain,subdomain,fromBlock,toBlock,fromDate,toDate,offset,limit) method

Summary

Gets native transactions in descending order based on block number

Returns

Returns a collection of native transactions.

Parameters
NameTypeDescription
addressSystem.Stringaddress
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlockSystem.StringThe minimum block number from where to get the transactions
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | The maximum block number from where to get the transactions.
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | fromDate | System.Nullable{System.Int32} | The date from where to get the transactions (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get the transactions to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | offset | System.String | offset |
    | limit | System.Nullable{System.Int32} | limit |

IAuthClientApi type

Namespace

Moralis.AuthApi.Interfaces

Summary

Defines methods and properties of an Authentication Api Client

AuthEndpoint property

Summary

Target Authentication Endpoint.

IsInitialized property

Summary

Indicates that the client has been initialized.

Initialize(serverUrl) method

Summary

Initialize the client using serverUrl. If serverUrl is null default is used.
ApiKey is passed via Configuration signleton.

Parameters
NameTypeDescription
serverUrlSystem.String

IAuthenticationApi type

Namespace

Moralis.AuthApi.Interfaces

Summary

Defines properties and methods of an Authentication Api Endpoint.

Challenge(request,network) method

Summary

Calls the Moralis Authentication Api Challenge operation to generate an authentication message.

Returns

ChallengeResponseDto

Parameters
Exceptions
NameDescription
ApiException

CompleteChallenge(request,network) method

Summary

After a message is signed this operation is used to call the Moralis Authentication Challenge Verify operation to validate the signature.

Returns

CompleteChallengeResponseDto

Parameters
Exceptions
NameDescription
ApiException

HealthCheck() method

Summary

Exposes the HealthCheck operation of the Moralis Authentication API which enables client applications a way to determine that the Moralis Authentrication Api is available.

Returns

HealthCheckResponse

Parameters

This method has no parameters.

Exceptions
NameDescription
ApiException

IBetaApi type

Namespace

Moralis.StreamsApi.Interfaces

GetStats() method

Summary
Returns
Parameters

This method has no parameters.

IDefiApi type

Namespace

Moralis.Web3Api.Interfaces

Summary

Represents a collection of functions to interact with the API endpoints

GetPairAddress(exchange,token0Address,token1Address,chain,toBlock,toDate) method

Summary

Fetches and returns pair data of the provided token0+token1 combination.
The token0 and token1 options are interchangable (ie. there is no different outcome in "token0=WETH and token1=USDT" or "token0=USDT and token1=WETH")

Returns

Returns the pair address of the two tokens

Parameters
NameTypeDescription
exchangeSystem.StringThe factory name or address of the token exchange
token0AddressSystem.StringToken0 address
token1AddressSystem.StringToken1 address
chainMoralis.Web3Api.Models.ChainListThe chain to query
toBlockSystem.StringTo get the reserves at this block number
toDateSystem.StringGet the reserves to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |

GetPairReserves(pairAddress,chain,toBlock,toDate,providerUrl) method

Summary

Get the liquidity reserves for a given pair address

Returns

Returns the pair reserves

Parameters
NameTypeDescription
pairAddressSystem.StringLiquidity pair address
chainMoralis.Web3Api.Models.ChainListThe chain to query
toBlockSystem.StringTo get the reserves at this block number
toDateSystem.StringGet the reserves to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | providerUrl | System.String | web3 provider url to user when using local dev chain |

IHistoryApi type

Namespace

Moralis.StreamsApi.Interfaces

GetHistory(limit,cursor) method

Summary

Returns Webhook information - currently only Failed webhook information returned.

Returns

HistoryResponse

Parameters
NameTypeDescription
limitSystem.Int64
cursorSystem.String

ReplayHistory(id) method

Summary

Replay a specific history.

Returns

HistoryDetail

Parameters
NameTypeDescription
idSystem.String

INativeApi type

Namespace

Moralis.Web3Api.Interfaces

Summary

Represents a collection of functions to interact with the API endpoints

GetBlock(blockNumberOrHash,chain,subdomain) method

Summary

Gets the contents of a block by block hash

Returns

Returns the contents of a block

Parameters
NameTypeDescription
blockNumberOrHashSystem.StringThe block hash or block number
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)

GetContractEvents(address,topic,abi,chain,subdomain,providerUrl,fromBlock,toBlock,fromDate,toDate,offset,limit) method

Summary

Gets events in descending order based on block number

Returns

Returns a collection of events by topic

Parameters
NameTypeDescription
addressSystem.Stringaddress
topicSystem.StringThe topic of the event
abiSystem.ObjectABI of the specific event
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
providerUrlSystem.Stringweb3 provider url to user when using local dev chain
fromBlockSystem.Nullable{System.Int32}The minimum block number from where to get the logs
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | The maximum block number from where to get the logs.
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | fromDate | System.String | The date from where to get the logs (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get the logs to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | offset | System.Nullable{System.Int32} | offset |
    | limit | System.Nullable{System.Int32} | limit |

GetDateToBlock(date,chain,providerUrl) method

Summary

Gets the closest block of the provided date

Returns

Returns the blocknumber and corresponding date and timestamp

Parameters
NameTypeDescription
dateSystem.StringUnix date in miliseconds or a datestring (any format that is accepted by momentjs)
chainMoralis.Web3Api.Models.ChainListThe chain to query
providerUrlSystem.Stringweb3 provider url to user when using local dev chain

GetLogsByAddress(address,chain,subdomain,blockNumber,fromBlock,toBlock,fromDate,toDate,topic0,topic1,topic2,topic3) method

Summary

Gets the logs from an address

Returns

Returns the logs of an address

Parameters
NameTypeDescription
addressSystem.Stringaddress
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
blockNumberSystem.StringThe block number
  • Provide the param 'block_numer' or ('from_block' and / or 'to_block')
  • If 'block_numer' is provided in conbinaison with 'from_block' and / or 'to_block', 'block_number' will will be used |
    | fromBlock | System.String | The minimum block number from where to get the logs
  • Provide the param 'block_numer' or ('from_block' and / or 'to_block')
  • If 'block_numer' is provided in conbinaison with 'from_block' and / or 'to_block', 'block_number' will will be used |
    | toBlock | System.String | The maximum block number from where to get the logs
  • Provide the param 'block_numer' or ('from_block' and / or 'to_block')
  • If 'block_numer' is provided in conbinaison with 'from_block' and / or 'to_block', 'block_number' will will be used |
    | fromDate | System.String | The date from where to get the logs (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used.
  • If 'from_date' and the block params are provided, the block params will be used. Please refer to the blocks params sections (block_number,from_block and to_block) on how to use them |
    | toDate | System.String | Get the logs to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used.
  • If 'to_date' and the block params are provided, the block params will be used. Please refer to the blocks params sections (block_number,from_block and to_block) on how to use them |
    | topic0 | System.String | topic0 |
    | topic1 | System.String | topic1 |
    | topic2 | System.String | topic2 |
    | topic3 | System.String | topic3 |

GetNFTTransfersByBlock(blockNumberOrHash,chain,subdomain,offset,limit) method

Summary

Gets NFT transfers by block number or block hash

Returns

Returns the contents of a block

Parameters
NameTypeDescription
blockNumberOrHashSystem.StringThe block hash or block number
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetTransaction(transactionHash,chain,subdomain) method

Summary

Gets the contents of a block transaction by hash

Returns

Returns the contents of a block transaction

Parameters
NameTypeDescription
transactionHashSystem.StringThe transaction hash
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)

RunContractFunction``1(address,functionName,abi,chain,subdomain,providerUrl) method

Summary

Runs a given function of a contract abi and returns readonly data

Returns

Returns response of the function executed

Parameters
NameTypeDescription
addressSystem.Stringaddress
functionNameSystem.Stringfunction_name
abiMoralis.Web3Api.Models.RunContractDtoBody
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
providerUrlSystem.Stringweb3 provider url to user when using local dev chain

IResolveApi type

Namespace

Moralis.Web3Api.Interfaces

Summary

Represents a collection of functions to interact with the API endpoints

ResolveAddress(address) method

Summary

Resolves an ETH address and find the ENS name

Returns

Returns an ENS

Parameters
NameTypeDescription
addressSystem.StringThe address to be resolved

ResolveDomain(domain,currency) method

Summary

Resolves an Unstoppable domain and returns the address

Returns

Returns an address

Parameters
NameTypeDescription
domainSystem.StringDomain to be resolved
currencySystem.StringThe currency to query

ISolanaApi type

Namespace

Moralis.SolanaApi.Interfaces

Account property

Summary

AccountApi operations.

IsInitialized property

Summary

Indicates that the client has been initialized.

Nft property

Summary

TokenApi operations.

Initialize(serverUrl) method

Summary

Initialize the client using serverUrl. If serverUrl is null default is used.
ApiKey is passed via Configuration signleton.

Parameters
NameTypeDescription
serverUrlSystem.String

IStorageApi type

Namespace

Moralis.Web3Api.Interfaces

Summary

Represents a collection of functions to interact with the API endpoints

UploadFolder(abi) method

Summary

Uploads multiple files and place them in a folder directory

Returns

Returns the path to the uploaded files

Parameters
NameTypeDescription
abiSystem.Collections.Generic.List{Moralis.Web3Api.Models.IpfsFileRequest}Array of JSON and Base64 Supported

IStreamsApi type

Namespace

Moralis.StreamsApi.Interfaces

BindStream(req) method

Summary

Creates a new stream.

Returns

bool

Parameters

DeleteStream(id) method

Summary

Delete a specific stream.

Returns
Parameters
NameTypeDescription
idSystem.String

GetStream(id) method

Summary

Get a specific stream.

Returns

StreamBindingDto[]

Parameters
NameTypeDescription
idSystem.String

UpdateStream(req) method

Summary

Updates a specific stream.

Returns
Parameters

IStreamsApiClient type

Namespace

Moralis.StreamsApi.Interfaces

BetaEndpoint property

Summary

HistoryEndpoint property

Summary

IsInitialized property

Summary

Indicates that the client has been initialized.

SettingsEndpoint property

Summary

Target Settings Endpoint

StreamsEndpoint property

Summary

Target Streams Endpoint

Initialize(serverUrl) method

Summary

Initialize the client using serverUrl. If serverUrl is null default is used.
ApiKey is passed via Configuration signleton.

Parameters
NameTypeDescription
serverUrlSystem.String

VerifySignature(signature,requestBody) method

Summary

Verifies that a WebHook message was sent by Moralis using sha3(REQUEST_BODY + WEB3_API_KEY);

Returns

bool

Parameters
NameTypeDescription
signatureSystem.String
requestBodySystem.String

ITokenApi type

Namespace

Moralis.Web3Api.Interfaces

Summary

Represents a collection of functions to interact with the API endpoints

GetAllTokenIds(address,chain,format,offset,limit) method

Summary

Gets data, including metadata (where available), for all token ids for the given contract address.

  • Results are sorted by the block the token id was minted (descending) and limited to 100 per page by default
  • Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection
Returns

Returns a collection of nfts

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetContractNFTTransfers(address,chain,format,offset,limit) method

Summary

Gets the transfers of the tokens matching the given parameters

Returns

Returns a collection of NFT transfers

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetNFTLowestPrice(address,chain,days,providerUrl,marketplace) method

Summary

Get the lowest price found for a nft token contract for the last x days (only trades paid in ETH)

Returns

Returns the trade with the lowest price

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
daysSystem.Nullable{System.Int32}The number of days to look back to find the lowest price
If not provided 7 days will be the default
providerUrlSystem.Stringweb3 provider url to user when using local dev chain
marketplaceSystem.Stringmarketplace from where to get the trades (only opensea is supported at the moment)

GetNFTMetadata(address,chain) method

Summary

Gets the contract level metadata (name, symbol, base token uri) for the given contract

  • Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection
Returns

Returns a collection NFT collections.

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query

GetNFTOwners(address,chain,format,offset,limit) method

Summary

Gets all owners of NFT items within a given contract collection

  • Use after /nft/contract/{token_address} to find out who owns each token id in a collection
  • Make sure to include a sort parm on a column like block_number_minted for consistent pagination results
  • Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection
Returns

Returns a collection of nft owners

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetNFTTrades(address,chain,fromBlock,toBlock,fromDate,toDate,providerUrl,marketplace,offset,limit) method

Summary

Get the nft trades for a given contracts and marketplace

Returns

Returns the trades

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
fromBlockSystem.StringThe minimum block number from where to get the transfers
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | To get the reserves at this block number |
    | fromDate | System.String | The date from where to get the transfers (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get the reserves to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | providerUrl | System.String | web3 provider url to user when using local dev chain |
    | marketplace | System.String | marketplace from where to get the trades (only opensea is supported at the moment) |
    | offset | System.String | offset |
    | limit | System.Nullable{System.Int32} | limit |

GetNftTransfersFromToBlock(chain,fromBlock,toBlock,fromDate,toDate,format,offset,limit) method

Summary

Gets the transfers of the tokens from a block number to a block number

Returns

Returns a collection of NFT transfers

Parameters
NameTypeDescription
chainMoralis.Web3Api.Models.ChainListThe chain to query
fromBlockSystem.StringThe minimum block number from where to get the transfers
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | The maximum block number from where to get the transfers.
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | fromDate | System.Nullable{System.Int32} | The date from where to get the transfers (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get transfers up until this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | format | System.String | The format of the token id |
    | offset | System.String | offset |
    | limit | System.Nullable{System.Int32} | limit |

GetTokenAddressTransfers(address,chain,subdomain,fromBlock,toBlock,fromDate,toDate,offset,limit) method

Summary

Gets ERC20 token contract transactions in descending order based on block number

Returns

Returns a collection of token contract transactions.

Parameters
NameTypeDescription
addressSystem.StringThe address of the token contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlockSystem.Nullable{System.Int32}The minimum block number from where to get the transfers
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | The maximum block number from where to get the transfers.
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | fromDate | System.String | The date from where to get the transfers (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get the transfers to this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | offset | System.Nullable{System.Int32} | offset |
    | limit | System.Nullable{System.Int32} | limit |

GetTokenAllowance(address,ownerAddress,spenderAddress,chain,providerUrl) method

Summary

Gets the amount which the spender is allowed to withdraw from the spender

Returns

Returns the amount which the spender is allowed to withdraw from the owner..

Parameters
NameTypeDescription
addressSystem.StringThe address of the token contract
ownerAddressSystem.StringThe address of the token owner
spenderAddressSystem.StringThe address of the token spender
chainMoralis.Web3Api.Models.ChainListThe chain to query
providerUrlSystem.Stringweb3 provider url to user when using local dev chain

GetTokenIdMetadata(address,tokenId,chain,format) method

Summary

Gets data, including metadata (where available), for the given token id of the given contract address.

  • Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection
Returns

Returns the specified NFT

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
tokenIdSystem.StringThe id of the token
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id

GetTokenIdOwners(address,tokenId,chain,format,offset,limit) method

Summary

Gets all owners of NFT items within a given contract collection

  • Use after /nft/contract/{token_address} to find out who owns each token id in a collection
  • Make sure to include a sort parm on a column like block_number_minted for consistent pagination results
  • Requests for contract addresses not yet indexed will automatically start the indexing process for that NFT collection
Returns

Returns a collection of NFTs with their respective owners

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
tokenIdSystem.StringThe id of the token
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit

GetTokenMetadata(addresses,chain,subdomain,providerUrl) method

Summary

Returns metadata (name, symbol, decimals, logo) for a given token contract address.

Returns

Returns metadata (name, symbol, decimals, logo) for a given token contract address.

Parameters
NameTypeDescription
addressesSystem.Collections.Generic.List{System.String}The addresses to get metadata for
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)
providerUrlSystem.Stringweb3 provider url to user when using local dev chain

GetTokenMetadataBySymbol(symbols,chain,subdomain) method

Summary

Returns metadata (name, symbol, decimals, logo) for a given token contract address.

Returns

Returns metadata (name, symbol, decimals, logo) for a given token contract address.

Parameters
NameTypeDescription
symbolsSystem.Collections.Generic.List{System.String}The symbols to get metadata for
chainMoralis.Web3Api.Models.ChainListThe chain to query
subdomainSystem.StringThe subdomain of the moralis server to use (Only use when selecting local devchain as chain)

GetTokenPrice(address,chain,providerUrl,exchange,toBlock) method

Summary

Returns the price nominated in the native token and usd for a given token contract address.

Returns

Returns the price nominated in the native token and usd for a given token contract address

Parameters
NameTypeDescription
addressSystem.StringThe address of the token contract
chainMoralis.Web3Api.Models.ChainListThe chain to query
providerUrlSystem.Stringweb3 provider url to user when using local dev chain
exchangeSystem.StringThe factory name or address of the token exchange
toBlockSystem.Nullable{System.Int32}to_block

GetWalletTokenIdTransfers(address,tokenId,chain,format,offset,limit,order) method

Summary

Gets the transfers of the tokens matching the given parameters

Returns

Returns a collection of NFT transfers

Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
tokenIdSystem.StringThe id of the token
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
offsetSystem.Stringoffset
limitSystem.Nullable{System.Int32}limit
orderSystem.StringThe field(s) to order on and if it should be ordered in ascending or descending order. Specified by: fieldName1.order,fieldName2.order. Example 1: "block_number", "block_number.ASC", "block_number.DESC", Example 2: "block_number and contract_type", "block_number.ASC,contract_type.DESC"

ReSyncMetadata(address,tokenId,chain) method

Summary

ReSync the metadata for an NFT

Returns
Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
tokenIdSystem.StringThe id of the token
chainMoralis.Web3Api.Models.ChainListThe chain to query

SearchNFTs(q,chain,format,filter,fromBlock,toBlock,fromDate,toDate,offset,limit) method

Summary

Gets NFTs that match a given metadata search.

Returns

Returns the matching NFTs

Parameters
NameTypeDescription
qSystem.StringThe search string
chainMoralis.Web3Api.Models.ChainListThe chain to query
formatSystem.StringThe format of the token id
filterSystem.StringWhat fields the search should match on. To look into the entire metadata set the value to 'global'. To have a better response time you can look into a specific field like name
fromBlockSystem.StringThe minimum block number from where to start the search
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toBlock | System.Nullable{System.Int32} | The maximum block number from where to end the search
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | fromDate | System.Nullable{System.Int32} | The date from where to start the search (any format that is accepted by momentjs)
  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used. |
    | toDate | System.String | Get search results up until this date (any format that is accepted by momentjs)
  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used. |
    | offset | System.String | offset |
    | limit | System.Nullable{System.Int32} | limit |

SyncNFTContract(address,chain) method

Summary

Sync a Contract for NFT Index

Returns
Parameters
NameTypeDescription
addressSystem.StringAddress of the contract
chainMoralis.Web3Api.Models.ChainListThe chain to query

IWeb3Api type

Namespace

Moralis.Web3Api.Interfaces

Account property

Summary

AccountApi operations.

Defi property

Summary

DefiApi operations

Info property

Summary

InfoApi operations

IsInitialized property

Summary

Indicates that the client has been initialized.

Native property

Summary

NativeApi operations.

Resolve property

Summary

ResolveApi operations.

Storage property

Summary

StorageApi operations.

Token property

Summary

TokenApi operations.

Initialize(serverUrl) method

Summary

Initialize the client using serverUrl. If serverUrl is null default is used.
ApiKey is passed via Configuration signleton.

Parameters
NameTypeDescription
serverUrlSystem.String

IWebClient type

Namespace

Moralis.SolanaApi.Interfaces

IWebClient type

Namespace

Moralis.Web3Api.Interfaces

ExecuteAsync(httpRequest) method

Summary

Executes HTTP request to a Target with Method HTTP verb
and Headers.

Returns

A task that resolves to Htt

Parameters
NameTypeDescription
httpRequestMoralis.SolanaApi.Models.WebRequestThe HTTP request to be executed.

ExecuteAsync(httpRequest) method

Summary

Executes HTTP request to a Target with Method HTTP verb
and Headers.

Returns

A task that resolves to Htt

Parameters
NameTypeDescription
httpRequestMoralis.Web3Api.Models.WebRequestThe HTTP request to be executed.

InfoApi type

Namespace

Moralis.Web3Api.Api

# ctor(apiClient) constructor

Summary

Initializes a new instance of the DefiApi class.

Returns
Parameters
NameTypeDescription
apiClientMoralis.Network.ApiClientan instance of ApiClient (optional)

# ctor() constructor

Summary

Initializes a new instance of the DefiApi class.

Returns
Parameters

This constructor has no parameters.

ApiClient property

Summary

Gets or sets the API client.

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

GetEndpointWeights() method

Summary

Returns the endpoint price list for rate limits and costs.

Returns
Parameters

This method has no parameters.

Exceptions

GetWeb3ApiVersion() method

Summary

Returns the current version of the Web3 API

Returns
Parameters

This method has no parameters.

Exceptions

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
NameTypeDescription
basePathSystem.StringThe base path

IpfsFile type

Namespace

Moralis.Web3Api.Models

Path property

Summary

Path to file
example: https://ipfs.moralis.io/QmPQ3YJ3hgfsBzJ1U4MGyV2C1GhDy6MWCENr1qMdMpKVnY/moralis/logo.jpg

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

IpfsFileRequest type

Namespace

Moralis.Web3Api.Models

Content property

Summary

base64 or JSON
example: iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAAKYB3X3

Path property

Summary

Path to file
example: moralis/logo.jpg

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Log type

Namespace

Moralis.Web3Api.Models

Address property

Summary

The address of the contract
example: 0x3105d328c66d8d55092358cf595d54608178e9b5

BlockHash property

Summary

The hash of the block
example: 0x9b559aef7ea858608c2e554246fe4a24287e7aeeb976848df2b9a2531f4b9171

BlockNumber property

Summary

The block number
example: 12386788

BlockTimestamp property

Summary

The timestamp of the block
example: 5/7/2021 11:08:35 AM

Data property

Summary

The data of the log
example: 0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443

LogIndex property

Summary

example: 273

Topic0 property

Summary

example: 0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a

Topic1 property

Summary

example: 0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391

Topic2 property

Summary

example: 0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9

Topic3 property

Summary

TransactionHash property

Summary

The hash of the transaction
example: 0xdd9006489e46670e0e85d1fb88823099e7f596b08aeaac023e9da0851f26fdd5

TransactionIndex property

Summary

example: 204

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

LogEvent type

Namespace

Moralis.Web3Api.Models

Address property

Summary

The address of the contract
example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

BlockHash property

Summary

The block hash
example: 0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86

BlockNumber property

Summary

The block number
example: 12526958

BlockTimestamp property

Summary

The block timestamp
example: 4/2/2021 10:07:54 AM

Data property

Summary

The content of the event

TransactionHash property

Summary

The transaction hash
example: 0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

LogEventByAddress type

Namespace

Moralis.Web3Api.Models

Address property

Summary

The address of the contract
example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

BlockHash property

Summary

The block hash
example: 0x0372c302e3c52e8f2e15d155e2c545e6d802e479236564af052759253b20fd86

BlockNumber property

Summary

The block number
example: 12526958

BlockTimestamp property

Summary

The block timestamp
example: 4/2/2021 10:07:54 AM

Data property

Summary

The data of the log
example: 0x00000000000000000000000000000000000000000000000de05239bccd4d537400000000000000000000000000024dbc80a9f80e3d5fc0a0ee30e2693781a443

Topic0 property

Summary

example: 0x2caecd17d02f56fa897705dcc740da2d237c373f70686f4e0d9bd3bf0400ea7a

Topic1 property

Summary

example: 0x000000000000000000000000031002d15b0d0cd7c9129d6f644446368deae391

Topic2 property

Summary

example: 0x000000000000000000000000d25943be09f968ba740e0782a34e710100defae9

Topic3 property

Summary

TransactionHash property

Summary

The transaction hash
example: 0x2d30ca6f024dbc1307ac8a1a44ca27de6f797ec22ef20627a1307243b0ab7d09

ToJson() method

Summary

Get the JSON string presentation of the object

Returns

JSON string presentation of the object

Parameters

This method has no parameters.

ToString() method

Summary

Get the string presentation of the object

Returns

String presentation of the object

Parameters

This method has no parameters.

Method type

Namespace

Moralis.Network

Summary

REST Verbs

MoralisAuthApiClient type

Namespace

Moralis.AuthApi

Summary

Provides an easy to wrapper around the Moralis Web3Api REST services.

AuthenticationApi property

Summary

Gets the AuthApiClient instance. Moralis.Initialize must be called first.
If Moralis is not initialized this will throw an ApiException.

Exceptions
NameDescription
Moralis.Network.ApiExceptionThrown when Moralis.Initialize has not been called.

Initialize(apiKey,url) method

Summary

Initialize Moralis Web3API.

Parameters
NameTypeDescription
apiKeySystem.StringRequired if useStandardServer is true
urlSystem.StringOptional server url. If not provided default standard server Url is used.

MoralisClient type

Namespace

Moralis

Summary

Main object used to access Moralis APIs and other functioinality.

The MoralisClient is provided as a singleto object. It need only
be setup once within an application.

Before the Moralis Client can be used, it must be started (initialized).
There are several ways to do the, however the easiest way to do so is
to setup MoralisClient.ConnectionData before doing anything else with
the MoralisClient. The MoralisClient is self initializing provided
MoralisClient.ConnectionData has been setup with valid information.

For Example:

MoralisClient.ConnectionData = new ServerConnectionData()
{
    ApiKey = "YOUR API KEY HERE"
};
IWeb3Api apiClient = MoralisClient.Web3Api;

This code is perfectly valid as, since ConnectionData was instantiated properly,
calling any public class level object on MoralisClient will, if MoralisClient
has not already been initialize, automatically initialize MoralisClient
using the information provided in ConnectionData.

# ctor(connectionData,authApi,streamsApi,web3Api) constructor

Summary

Creates an instance of the Moralis Client.

Parameters
Exceptions

AuthenticationApi property

Summary

Instance of the Authentication API

ConnectionData property

Summary

The information used to connect to Moralis Services

IsInitialized property

Summary

Indicates if the Moralis Client has been initialized.

SolanaApi property

Summary

Instance of the Solana API

StreamsApi property

Summary

Instance of the Streams Api

Web3Api property

Summary

Instance of the Web3 Api

Start() method

Summary

Default initializer of the Moralis Client

Parameters

This method has no parameters.

Start(connectionData) method

Summary

Initialize Moralis Client using Connection Data to derive all API clients

Parameters
NameTypeDescription
connectionDataMoralis.Models.ServerConnectionData

Start(connectionData,authApi,streamsApi,web3Api) method

Summary

Initialize Moralis Client by providing connection data and pre-initialized Api Clients

Parameters

MoralisSolanaApiClient type

Namespace

Moralis.SolanaApi

SolanaApi property

Summary

Gets the Web3ApiClient instance. Moralis.Initialize must be called first.
If Moralis is not initialized this will throw an ApiException.

Exceptions
NameDescription
Moralis.Network.ApiExceptionThrown when Moralis.Initialize has not been called.

Initialize(url,apiKey) method

Summary

Initialize Moralis Web3API.

Parameters
NameTypeDescription
urlSystem.StringOptional server url. If not provided default standard server Url is used.
apiKeySystem.StringRequired if useStandardServer is true

MoralisStreamsApiClient type

Namespace

Moralis.StreamsApi

Summary

Simple, easy to use Api Client initializer.

StreamsApiClient property

Summary

Gets the StreamsApiClient instance. Moralis.Initialize must be called first.
If Moralis is not initialized this will throw an ApiException.

Exceptions
NameDescription
Moralis.Network.ApiExceptionThrown when Moralis.Initialize has not been called.

Initialize(apiKey,url) method

Summary

Initialize Moralis Web3API.

Parameters
NameTypeDescription
apiKeySystem.StringRequired if useStandardServer is true
urlSystem.StringOptional server url. If not provided default standard server Url is used.

MoralisWeb3ApiClient type

Namespace

Moralis.Web3Api

Summary

Provides an easy to wrapper around the Moralis Web3Api REST services.