Coder Social home page Coder Social logo

web3-dotnet-sdk's Introduction

Important

Deprecated: this repository is not being mantained.

As an alternative you can integrate Moralis by directly calling the API. Check the Moralis Docs for more info.

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
Name Type Description
json System.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
Name Type Description
apiClient Moralis.Network.ApiClient an 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
Name Type Description
apiClient Moralis.Network.ApiClient an 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
Name Type Description
basePath System.String The base path

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
Name Type Description
basePath System.String The 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
Name Type Description
address System.String The sender or recepient of the transfer
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
direction System.String The transfer direction
offset System.String offset
limit System.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
Name Type Description
address System.String The owner of a given token
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.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
Name Type Description
address System.String The owner of a given token
tokenAddress System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.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
Name Type Description
address System.String The address for which the native balance will be checked
chain Moralis.Web3Api.Models.ChainList The chain to query
providerUrl System.String web3 provider url to user when using local dev chain
toBlock System.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
Name Type Description
address System.String The address for which token balances will be checked
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
toBlock System.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
Name Type Description
address System.String address
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlock System.String The 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
Name Type Description
address System.String address
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlock System.String The 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
Name Type Description
basePath System.String The 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
Name Type Description
basePath System.String The 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
Name Type Description
key System.String Header field name.
value System.String Header field value.

Base64Encode(text) method

Summary

Encode string in base64 format.

Returns

Encoded string.

Parameters
Name Type Description
text System.String String to be encoded.

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

Summary

Makes the HTTP request (Sync).

Returns

HttpResponseMessage

Parameters
Name Type Description
path System.String URL path.
method System.Net.Http.HttpMethod HTTP method.
queryParams System.Collections.Generic.Dictionary{System.String,System.String} Query parameters.
postBody System.String HTTP body (POST request).
headerParams System.Collections.Generic.Dictionary{System.String,System.String} Header parameters.
formParams System.Collections.Generic.Dictionary{System.String,System.String} Form parameters.
fileParams System.Collections.Generic.Dictionary{System.String,Moralis.Network.FileParameter} File parameters.
authSettings System.String[] Authentication settings.

ConvertType(fromObject,toObject) method

Summary

Dynamically cast the object into target type.

Returns

Casted object

Parameters
Name Type Description
fromObject System.Object Object to be casted
toObject System.Type Target type

Deserialize(content,type,headers) method

Summary

Deserialize the JSON string into a proper object.

Returns

Object representation of the JSON string.

Parameters
Name Type Description
content System.String HTTP body (e.g. string, JSON).
type System.Type Object type.
headers System.Collections.Generic.IList{Moralis.Network.Parameter} HTTP headers.

EscapeString(str) method

Summary

Escape string (url-encoded).

Returns

Escaped string.

Parameters
Name Type Description
str System.String String to be escaped.

GetApiKeyWithPrefix(apiKeyIdentifier) method

Summary

Get the API key with prefix.

Returns

API key with prefix.

Parameters
Name Type Description
apiKeyIdentifier System.String API key identifier (authentication scheme).

ParameterToFile(name,stream) method

Summary

Create FileParameter based on Stream.

Returns

FileParameter.

Parameters
Name Type Description
name System.String Parameter name.
stream System.IO.Stream Input stream.

ParameterToHex(val) method

Summary

Convert a number to a HEX string.

Returns

Hex string.

Parameters
Name Type Description
val System.Int64 Value 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
Name Type Description
obj System.Object The parameter (header, path, query, form).

Serialize(obj) method

Summary

Serialize an object into JSON string.

Returns

JSON string.

Parameters
Name Type Description
obj System.Object Object.

UpdateParamsForAuth(queryParams,headerParams,authSettings) method

Summary

Update parameters based on authentication.

Parameters
Name Type Description
queryParams System.Collections.Generic.Dictionary{System.String,System.String} Query parameters.
headerParams System.Collections.Generic.Dictionary{System.String,System.String} Header parameters.
authSettings System.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
Name Type Description
errorCode System.Int32 HTTP status code.
message System.String Error message.

#ctor(errorCode,message,errorContent) constructor

Summary

Initializes a new instance of the ApiException class.

Parameters
Name Type Description
errorCode System.Int32 HTTP status code.
message System.String Error message.
errorContent System.Object Error 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
Name Type Description
serverUrl System.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
Name Type Description
serverUrl System.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
Name Type Description
apiClient Moralis.Network.ApiClient an 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
Name Type Description
request Moralis.AuthApi.Models.ChallengeRequestDto
network Moralis.AuthApi.Models.ChainNetworkType
Exceptions
Name Description
Moralis.Network.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
Name Type Description
request Moralis.AuthApi.Models.CompleteChallengeRequestDto
network Moralis.AuthApi.Models.ChainNetworkType
Exceptions
Name Description
Moralis.Network.ApiException

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
Name Type Description
basePath System.String The 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
Name Description
Moralis.Network.ApiException

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

BetaApi type

Namespace

Moralis.StreamsApi.Api

#ctor(apiClient) constructor

Summary

Initializes a new instance of the HistoryApi class.

Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an 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
Name Type Description
basePath System.String The base path

GetStats(limit,cursor) method

Summary

Retrieves history.

Returns

LogResponse

Parameters
Name Type Description
limit M:Moralis.StreamsApi.Api.BetaApi.GetStats double
Exceptions
Name Description
Moralis.Network.ApiException

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The 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
Name Type Description
bigDecimal Moralis.Unit.BigDecimal
alwaysTruncate System.Boolean

#ctor(value,alwaysTruncate) constructor

Summary

Constructor

Parameters
Name Type Description
value System.Decimal
alwaysTruncate System.Boolean

#ctor(mantissa,exponent,alwaysTruncate) constructor

Summary
Parameters
Name Type Description
mantissa System.Numerics.BigInteger
exponent System.Int32 The number of decimal units for example (-18). A positive value will be normalised as 10 ^
exponent |

| alwaysTruncate | System.Boolean | Specifies 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
Name Type Description
obj System.Object
Exceptions
Name Description
System.ArgumentException

CompareTo(other) method

Summary

Defines a comparison operator to compare against other BigDecimals.

Returns

int

Parameters
Name Type Description
other Moralis.Unit.BigDecimal

Equals(other) method

Summary

Provides equality operator against other BigDecimal objects.

Returns

bool

Parameters
Name Type Description
other Moralis.Unit.BigDecimal

Equals(obj) method

Summary

Provides a general equality operation

Returns

bool

Parameters
Name Type Description
obj System.Object

Exp(exponent) method

Summary

Applies exponent to BigDecimal.

Returns

BigDecimal

Parameters
Name Type Description
exponent System.Double double

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
Name Type Description
value System.String string

Pow(basis,exponent) method

Summary

Provide a Power operation

Returns

BigDecimal

Parameters
Name Type Description
basis System.Double double
exponent System.Double double

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
Name Type Description
formatSpecifier System.String string
format System.IFormatProvider IFormatProvider
Exceptions
Name Description
System.NotImplementedException

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
Name Type Description
left Moralis.Unit.BigDecimal BigDecimal
right Moralis.Unit.BigDecimal BigDecimal

op_Decrement(value) method

Summary

Defines decrement operation for BigDecimal value.

Returns

BigDecimal

Parameters
Name Type Description
value Moralis.Unit.BigDecimal BigDecimal

op_Division(dividend,divisor) method

Summary

Defines division operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
dividend Moralis.Unit.BigDecimal BigDecimal
divisor Moralis.Unit.BigDecimal BigDecimal

op_Equality(left,right) method

Summary

Defines equality operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
left Moralis.Unit.BigDecimal BigDecimal
right Moralis.Unit.BigDecimal BigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to double - possible data loss

Parameters
Name Type Description
value Moralis.Unit.BigDecimal)~System.Double BigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to float - possible data loss

Parameters
Name Type Description
value Moralis.Unit.BigDecimal)~System.Single BigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to decimal - possible data loss

Parameters
Name Type Description
value Moralis.Unit.BigDecimal)~System.Decimal BigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to int - possible data loss

Parameters
Name Type Description
value Moralis.Unit.BigDecimal)~System.Int32 BigDecimal

op_Explicit(value) method

Summary

Convert BigDecimal to uint - possible data loss

Parameters
Name Type Description
value Moralis.Unit.BigDecimal)~System.UInt32 BigDecimal

op_GreaterThan(left,right) method

Summary

Defines greater than operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
left Moralis.Unit.BigDecimal BigDecimal
right Moralis.Unit.BigDecimal BigDecimal

op_GreaterThanOrEqual(value) method

Summary

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

Returns

BigDecimal

Parameters
Name Type Description
value Moralis.Unit.BigDecimal BigDecimal

op_Implicit(value) method

Summary

Convert int to BigDecimal

Parameters
Name Type Description
value System.Int32)~Moralis.Unit.BigDecimal~Moralis.Unit.BigDecimal 'System.Int32)~Moralis.Unit.BigDecimal') int

op_Implicit(value) method

Summary

Convert BigInteger to BigDecimal

Parameters
Name Type Description
value System.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
Name Type Description
value System.Double)~Moralis.Unit.BigDecimal~Moralis.Unit.BigDecimal 'System.Double)~Moralis.Unit.BigDecimal') double

op_Implicit(value) method

Summary

Convert decimal to BigDecimal

Parameters
Name Type Description
value System.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
Name Type Description
value Moralis.Unit.BigDecimal BigDecimal

op_Inequality(left,right) method

Summary

Defines not equal operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
left Moralis.Unit.BigDecimal BigDecimal
right Moralis.Unit.BigDecimal BigDecimal

op_LessThan(left,right) method

Summary

Defines less than operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
left Moralis.Unit.BigDecimal BigDecimal
right Moralis.Unit.BigDecimal BigDecimal

op_LessThanOrEqual(left,right) method

Summary

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

Returns

BigDecimal

Parameters
Name Type Description
left Moralis.Unit.BigDecimal BigDecimal
right Moralis.Unit.BigDecimal BigDecimal

op_Multiply(left,right) method

Summary

Defines multiplication operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
left Moralis.Unit.BigDecimal BigDecimal
right Moralis.Unit.BigDecimal BigDecimal

op_Subtraction(left,right) method

Summary

Defines subtraction operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
left Moralis.Unit.BigDecimal BigDecimal
right Moralis.Unit.BigDecimal BigDecimal

op_UnaryNegation(value) method

Summary

Defines subtraction operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
value Moralis.Unit.BigDecimal BigDecimal

op_UnaryPlus(value) method

Summary

Defines addition operation for two BigDecimal values.

Returns

BigDecimal

Parameters
Name Type Description
value Moralis.Unit.BigDecimal BigDecimal

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
Name Type Description
value System.Numerics.BigInteger BigInteger

ParseInvariant(value) method

Summary

Parse an invariat value.

Returns

BigInteger

Parameters
Name Type Description
value System.String string
Exceptions
Name Description
System.ArgumentNullException

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
Name Type Description
apiClient Moralis.Network.ApiClient an 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
Name Type Description
basePath System.String The 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
Name Type Description
exchange System.String The factory name or address of the token exchange
token0Address System.String Token0 address
token1Address System.String Token1 address
chain Moralis.Web3Api.Models.ChainList The chain to query
toBlock System.String To get the reserves at this block number
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. |

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

Summary

Get the liquidity reserves for a given pair address

Returns

Returns the pair reserves

Parameters
Name Type Description
pairAddress System.String Liquidity pair address
chain Moralis.Web3Api.Models.ChainList The chain to query
toBlock System.String To get the reserves at this block number
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 |

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The 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
Name Type Description
target Moralis.Web3Api.Models.NativeTokenBalanceBase

ToBigNumber(val) method

Summary

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

Returns

BigInteger

Parameters
Name Type Description
val System.String Must be numeric

TokenSymbol(target) method

Summary

Returns the symbol for the target Chain Id

Returns

string

Parameters
Name Type Description
target Moralis.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
Name Type Description
name System.String
data System.Byte[]
filename System.String
contentType System.String

Create(name,data,filename) method

Summary

Creates a FileParameter.

Returns

FileParameter

Parameters
Name Type Description
name System.String
data System.Byte[]
filename System.String

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

Summary

Creates a FileParameter

Returns

FileParameter

Parameters
Name Type Description
name System.String
writer System.Action{System.IO.Stream}
contentLength System.Int64
fileName System.String
contentType System.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
Name Type Description
apiClient Moralis.Network.ApiClient an 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
Name Type Description
basePath System.String The base path

GetHistory(limit,cursor) method

Summary

Retrieves history.

Returns

LogResponse

Parameters
Name Type Description
limit System.Int64 double
cursor System.String string
Exceptions
Name Description
Moralis.Network.ApiException

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The 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
Name Type Description
address System.String The sender or recepient of the transfer
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
direction System.String The transfer direction
offset System.String offset
limit System.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
Name Type Description
address System.String The owner of a given token
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.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
Name Type Description
address System.String The owner of a given token
tokenAddress System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.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
Name Type Description
address System.String The address for which the native balance will be checked
chain Moralis.Web3Api.Models.ChainList The chain to query
providerUrl System.String web3 provider url to user when using local dev chain
toBlock System.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
Name Type Description
address System.String The address for which token balances will be checked
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
toBlock System.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
Name Type Description
address System.String address
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlock System.String The 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
Name Type Description
address System.String address
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlock System.String The 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
Name Type Description
serverUrl System.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
Name Type Description
request Moralis.AuthApi.Models.ChallengeRequestDto
network Moralis.AuthApi.Models.ChainNetworkType
Exceptions
Name Description
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
Name Type Description
request Moralis.AuthApi.Models.CompleteChallengeRequestDto
network Moralis.AuthApi.Models.ChainNetworkType
Exceptions
Name Description
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
Name Description
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
Name Type Description
exchange System.String The factory name or address of the token exchange
token0Address System.String Token0 address
token1Address System.String Token1 address
chain Moralis.Web3Api.Models.ChainList The chain to query
toBlock System.String To get the reserves at this block number
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. |

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

Summary

Get the liquidity reserves for a given pair address

Returns

Returns the pair reserves

Parameters
Name Type Description
pairAddress System.String Liquidity pair address
chain Moralis.Web3Api.Models.ChainList The chain to query
toBlock System.String To get the reserves at this block number
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 |

IHistoryApi type

Namespace

Moralis.StreamsApi.Interfaces

GetHistory(limit,cursor) method

Summary

Returns Webhook information - currently only Failed webhook information returned.

Returns

HistoryResponse

Parameters
Name Type Description
limit System.Int64
cursor System.String

ReplayHistory(id) method

Summary

Replay a specific history.

Returns

HistoryDetail

Parameters
Name Type Description
id System.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
Name Type Description
blockNumberOrHash System.String The block hash or block number
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The 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
Name Type Description
address System.String address
topic System.String The topic of the event
abi System.Object ABI of the specific event
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
providerUrl System.String web3 provider url to user when using local dev chain
fromBlock System.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
Name Type Description
date System.String Unix date in miliseconds or a datestring (any format that is accepted by momentjs)
chain Moralis.Web3Api.Models.ChainList The chain to query
providerUrl System.String web3 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
Name Type Description
address System.String address
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
blockNumber System.String The 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
Name Type Description
blockNumberOrHash System.String The block hash or block number
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
offset System.String offset
limit System.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
Name Type Description
transactionHash System.String The transaction hash
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The 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
Name Type Description
address System.String address
functionName System.String function_name
abi Moralis.Web3Api.Models.RunContractDto Body
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
providerUrl System.String web3 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
Name Type Description
address System.String The address to be resolved

ResolveDomain(domain,currency) method

Summary

Resolves an Unstoppable domain and returns the address

Returns

Returns an address

Parameters
Name Type Description
domain System.String Domain to be resolved
currency System.String The 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
Name Type Description
serverUrl System.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
Name Type Description
abi System.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
Name Type Description
req Moralis.StreamsApi.Models.StreamBindingDto

DeleteStream(id) method

Summary

Delete a specific stream.

Returns
Parameters
Name Type Description
id System.String

GetStream(id) method

Summary

Get a specific stream.

Returns

StreamBindingDto[]

Parameters
Name Type Description
id System.String

UpdateStream(req) method

Summary

Updates a specific stream.

Returns
Parameters
Name Type Description
req Moralis.StreamsApi.Models.StreamBindingDto

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
Name Type Description
serverUrl System.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
Name Type Description
signature System.String
requestBody System.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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
days System.Nullable{System.Int32} The number of days to look back to find the lowest price
If not provided 7 days will be the default
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)

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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The 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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
fromBlock System.String 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} | 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
Name Type Description
chain Moralis.Web3Api.Models.ChainList The chain to query
fromBlock System.String 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.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
Name Type Description
address System.String The address of the token contract
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlock System.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
Name Type Description
address System.String The address of the token contract
ownerAddress System.String The address of the token owner
spenderAddress System.String The address of the token spender
chain Moralis.Web3Api.Models.ChainList The chain to query
providerUrl System.String web3 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
Name Type Description
address System.String Address of the contract
tokenId System.String The id of the token
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The 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
Name Type Description
address System.String Address of the contract
tokenId System.String The id of the token
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.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
Name Type Description
addresses System.Collections.Generic.List{System.String} The addresses to get metadata for
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
providerUrl System.String web3 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
Name Type Description
symbols System.Collections.Generic.List{System.String} The symbols to get metadata for
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The 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
Name Type Description
address System.String The address of the token contract
chain Moralis.Web3Api.Models.ChainList The chain to query
providerUrl System.String web3 provider url to user when using local dev chain
exchange System.String The factory name or address of the token exchange
toBlock System.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
Name Type Description
address System.String Address of the contract
tokenId System.String The id of the token
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
offset System.String offset
limit System.Nullable{System.Int32} limit
order System.String The 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
Name Type Description
address System.String Address of the contract
tokenId System.String The id of the token
chain Moralis.Web3Api.Models.ChainList The 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
Name Type Description
q System.String The search string
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
filter System.String What 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
fromBlock System.String The 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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The 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
Name Type Description
serverUrl System.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
Name Type Description
httpRequest Moralis.SolanaApi.Models.WebRequest The 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
Name Type Description
httpRequest Moralis.Web3Api.Models.WebRequest The 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
Name Type Description
apiClient Moralis.Network.ApiClient an 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
Name Type Description
basePath System.String The base path

GetEndpointWeights() method

Summary

Returns the endpoint price list for rate limits and costs.

Returns
Parameters

This method has no parameters.

Exceptions
Name Description
Moralis.Network.ApiException

GetWeb3ApiVersion() method

Summary

Returns the current version of the Web3 API

Returns
Parameters

This method has no parameters.

Exceptions
Name Description
Moralis.Network.ApiException

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The 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
Name Description
Moralis.Network.ApiException Thrown when Moralis.Initialize has not been called.

Initialize(apiKey,url) method

Summary

Initialize Moralis Web3API.

Parameters
Name Type Description
apiKey System.String Required if useStandardServer is true
url System.String Optional 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
Name Type Description
connectionData Moralis.Models.ServerConnectionData
authApi Moralis.AuthApi.Interfaces.IAuthClientApi
streamsApi Moralis.SolanaApi.Interfaces.ISolanaApi
web3Api Moralis.StreamsApi.Interfaces.IStreamsApiClient
Exceptions
Name Description
System.ArgumentNullException

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
Name Type Description
connectionData Moralis.Models.ServerConnectionData

Start(connectionData,authApi,streamsApi,web3Api) method

Summary

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

Parameters
Name Type Description
connectionData Moralis.Models.ServerConnectionData
authApi Moralis.AuthApi.Interfaces.IAuthClientApi
streamsApi Moralis.SolanaApi.Interfaces.ISolanaApi
web3Api Moralis.StreamsApi.Interfaces.IStreamsApiClient

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
Name Description
Moralis.Network.ApiException Thrown when Moralis.Initialize has not been called.

Initialize(url,apiKey) method

Summary

Initialize Moralis Web3API.

Parameters
Name Type Description
url System.String Optional server url. If not provided default standard server Url is used.
apiKey System.String Required 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
Name Description
Moralis.Network.ApiException Thrown when Moralis.Initialize has not been called.

Initialize(apiKey,url) method

Summary

Initialize Moralis Web3API.

Parameters
Name Type Description
apiKey System.String Required if useStandardServer is true
url System.String Optional 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.

Web3Api property

Summary

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

Exceptions
Name Description
Moralis.Network.ApiException Thrown when Moralis.Initialize has not been called.

Initialize(url,apiKey) method

Summary

Initialize Moralis Web3API.

Parameters
Name Type Description
url System.String Optional server url. If not provided default standard server Url is used.
apiKey System.String Required if useStandardServer is true

NativeApi 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 NativeApi class.

Returns
Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an instance of ApiClient (optional)

#ctor() constructor

Summary

Initializes a new instance of the NativeApi 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
Name Type Description
basePath System.String The base path

GetBlock(blockNumberOrHash,chain,subdomain) method

Summary

Gets the contents of a block by block hash

Returns

Returns the contents of a block

Parameters
Name Type Description
blockNumberOrHash System.String The block hash or block number
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The 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
Name Type Description
address System.String address
topic System.String The topic of the event
abi System.Object ABI of the specific event
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
providerUrl System.String web3 provider url to user when using local dev chain
fromBlock System.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
Name Type Description
date System.String Unix date in miliseconds or a datestring (any format that is accepted by momentjs)
chain Moralis.Web3Api.Models.ChainList The chain to query
providerUrl System.String web3 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
Name Type Description
address System.String address
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
blockNumber System.String The 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
Name Type Description
blockNumberOrHash System.String The block hash or block number
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
offset System.String offset
limit System.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
Name Type Description
transactionHash System.String The transaction hash
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The 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
Name Type Description
address System.String address
functionName System.String function_name
abi Moralis.Web3Api.Models.RunContractDto Body
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
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
Name Type Description
basePath System.String The base path

NativeBalance type

Namespace

Moralis.Web3Api.Models

Balance property

Summary

The balance example: 1234567890

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.

NativeErc20Price type

Namespace

Moralis.Web3Api.Models

Decimals property

Summary

The number of decimals of the token example: 18

Name property

Summary

The Name of the token example: Ether

Symbol property

Summary

The Symbol of the token example: ETH

Value property

Summary

The native price of the token example: 8409770570506626

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.

NativeTokenBalanceBase type

Namespace

Moralis.Web3Api.Models

Summary

Abstract class used to provide basic value utilities.

ChainId property

Summary

Chain Associated with this object.

Decimals property

Summary

The number of decimals to express WEI as Native Token.

NativeTokenBalance property

Summary

Returns the Native Token balance as derived from WEI value and Decinmals.

RawBalance() method

Summary

Derived class should override and return target value amount.

Returns
Parameters

This method has no parameters.

NetworkExtensions type

Namespace

Moralis.Network

Summary

Extension utility methods for network objects.

ReadAsBytes(s) method

Summary

Adds a ReadAsBytes function to a standard stream object.

Returns

byte[]

Parameters
Name Type Description
s System.IO.Stream

NetworkTypes type

Namespace

Moralis.Network

Summary

Indicates Main or test networks.

Nft type

Namespace

Moralis.Web3Api.Models

Amount property

Summary

The number of this item the user owns (used by ERC1155) example: 1

ContractType property

Summary

The type of NFT contract standard example: ERC721

Metadata property

Summary

The metadata of the token

Name property

Summary

The name of the Token contract example: CryptoKitties

Symbol property

Summary

The symbol of the NFT contract example: RARI

SyncedAt property

Summary

when the metadata was last updated

TokenAddress property

Summary

The address of the contract of the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TokenId property

Summary

The token id of the NFT example: 15

TokenUri property

Summary

The uri to the metadata of the token

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.

NftApi type

Namespace

Moralis.SolanaApi.Api

#ctor(apiClient) constructor

Summary

Initializes a new instance of the class.

Returns
Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an instance of ApiClient (optional)

#ctor() constructor

Summary

Initializes a new instance of the 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
Name Type Description
basePath System.String The base path

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

NftCollection 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.

NftContractMetadata type

Namespace

Moralis.Web3Api.Models

Abi property

Summary

The abi of the token Contract

ContractType property

Summary

The type of NFT contract example: ERC721

Name property

Summary

The name of the token Contract example: KryptoKitties

SupportsTokenUri property

Summary

value -1 if the contract does not support token_uri

Symbol property

Summary

The symbol of the NFT contract example: RARI

SyncedAt property

Summary

Timestamp of when the contract was last synced with the node

TokenAddress property

Summary

The address of the token contract 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.

NftContractMetadataCollection 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.

NftMetadata type

Namespace

Moralis.Web3Api.Models

ContractType property

Summary

The type of NFT contract standard example: ERC721

Metadata property

Summary

The metadata of the token

SyncedAt property

Summary

when the metadata was last updated

TokenAddress property

Summary

The address of the contract of the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TokenId property

Summary

The token id of the NFT example: 15

TokenUri property

Summary

The uri to the metadata of the token

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.

NftMetadataCollection 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.

NftOwner type

Namespace

Moralis.Web3Api.Models

Amount property

Summary

The number of this item the user owns (used by ERC1155) example: 1

BlockNumber property

Summary

The blocknumber when the amount or owner changed example: 88256

BlockNumberMinted property

Summary

The blocknumber when the NFT was minted example: 88256

ContractType property

Summary

The type of NFT contract standard example: ERC721

Metadata property

Summary

The metadata of the token

Name property

Summary

The name of the Token contract example: CryptoKitties

OwnerOf property

Summary

The address of the owner of the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

Symbol property

Summary

The symbol of the NFT contract example: RARI

SyncedAt property

Summary

when the metadata was last updated

TokenAddress property

Summary

The address of the contract of the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TokenId property

Summary

The token id of the NFT example: 15

TokenUri property

Summary

The uri to the metadata of the token

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.

NftOwnerCollection 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

Status property

Summary

The syncing status of the address [SYNCING/SYNCED] example: SYNCING

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.

NftTransfer type

Namespace

Moralis.Web3Api.Models

Amount property

Summary

The number of tokens transferred example: 1

BlockHash property

Summary

The block hash of the transaction

BlockNumber property

Summary

The blocknumber of the transaction example: 88256

BlockTimestamp property

Summary

The block timestamp example: 6/4/2021 4:00:15 PM

ContractType property

Summary

The type of NFT contract standard example: ERC721

FromAddress property

Summary

The address that sent the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

LogIndex property

Summary

The log index

Operator property

Summary

The operator present only for ERC1155 Transfers example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

ToAddress property

Summary

The address that recieved the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TokenAddress property

Summary

The address of the contract of the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TokenId property

Summary

The token id of the NFT example: 15

TransactionHash property

Summary

The transaction hash example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TransactionIndex property

Summary

The transaction index

TransactionType property

Summary

The transaction type

Value property

Summary

The value that was sent in the transaction (ETH/BNB/etc..) example: 1000000000000000

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.

NftTransferCollection type

Namespace

Moralis.Web3Api.Models

BlockExists property

Summary

Indicator if the block exists example: True

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.

NumberFormatting type

Namespace

Moralis.Unit

Summary

Provides functions for formating number

Parameter type

Namespace

Moralis.Network

Summary

A defined transfer parameter values.

#ctor(name,value,type) constructor

Summary

Constructor

Parameters
Name Type Description
name System.String
value System.Object
type Moralis.Network.ParameterType

#ctor(name,value,contentType,type) constructor

Summary

Constructor

Parameters
Name Type Description
name System.String
value System.Object
contentType System.String
type Moralis.Network.ParameterType

ContentType property

Summary

Transfer Content Type of the parameter.

DataFormat property

Summary

Dataformat the parameter is passed in.

Name property

Summary

Parameter name.

Type property

Summary

Type represented by the parameter.

Value property

Summary

Value passed in the parameter.

Equals(other) method

Summary

Provides equality operation against another Parameter.

Returns

bool

Parameters
Name Type Description
other Moralis.Network.Parameter

Equals(obj) method

Summary

Provides equality operation against another object.

Returns
Parameters
Name Type Description
obj System.Object

GetHashCode() method

Summary

Overrides the Hash code method.

Returns

int

Parameters

This method has no parameters.

ToString() method

Summary

Overrides the ToString function.

Returns

string

Parameters

This method has no parameters.

ParameterType type

Namespace

Moralis.Network

Summary

Parmeters types

ProjectApi type

Namespace

Moralis.StreamsApi.Api

#ctor(apiClient) constructor

Summary

Initializes a new instance of the class.

Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an instance of ApiClient (optional)

#ctor() constructor

Summary

Initializes a new instance of the 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
Name Type Description
basePath System.String The base path

GetSettings() method

Summary

Retrieves current stream settings.

Returns

SettingsDetail

Parameters

This method has no parameters.

Exceptions
Name Description
Moralis.Network.ApiException

PostSettings(req) method

Summary

Set the settings for the current project based on the project api-key.

Returns

bool

Parameters
Name Type Description
req Moralis.StreamsApi.Models.SettingsDetail SettingsDetail
Exceptions
Name Description
Moralis.Network.ApiException

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

ReservesCollection type

Namespace

Moralis.Web3Api.Models

Reserve0 property

Summary

reserve0 example: 1177323085102288091856004

Reserve1 property

Summary

reserve1 example: 9424175928981149993184

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.

Resolve type

Namespace

Moralis.Web3Api.Models

Address property

Summary

Resolved domain address example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

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.

ResolveApi 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 ResolveApi class.

Returns
Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an instance of ApiClient (optional)

#ctor() constructor

Summary

Initializes a new instance of the ResolveApi 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
Name Type Description
basePath System.String The base path

ResolveAddress(address) method

Summary

Resolves an ETH address and find the ENS name

Returns

Returns an ENS

Parameters
Name Type Description
address System.String The address to be resolved

ResolveDomain(domain,currency) method

Summary

Resolves an Unstoppable domain and returns the address

Returns

Returns an address

Parameters
Name Type Description
domain System.String Domain to be resolved
currency System.String The currency to query

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

RunContractDto type

Namespace

Moralis.Web3Api.Models

Abi property

Summary

The contract abi

Params property

Summary

The params for the given function

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.

ServerConnectionData type

Namespace

Moralis.Models

Summary

The set of properties required to access Moralis services.

#ctor() constructor

Summary

Default constructor - sets default configuration values.

Parameters

This constructor has no parameters.

ApiKey property

Summary

The Web3Api key, must be supplied to initialize Web3Api to use standard REST server.

AuthenticationApiUrl property

Summary

URL for the Authentication 2.0 API

Headers property

Summary

Additional HTTP headers to be sent with network requests from the SDK.

MasterKey property

Summary

The Master Key for the Moralis app targeted by .

SolanaApiUrl property

Summary

URL for the Solana API

StreamsApiUrl property

Summary

URL for Streams Api

Web3ApiUrl property

Summary

URL for Web3 Api and Solana Api

SolanaApiClient type

Namespace

Moralis.SolanaApi.Client

Summary

Provides a wrapper class around the Moralis Web3Api REST service. Automagically initializes client to use standard server or personal server Cloud Function API based on use of Api Key.

#ctor(serverUrl) constructor

Summary

Initialize client using just server url.

Parameters
Name Type Description
serverUrl System.String

Account property

Summary

AccountApi operations.

IsInitialized property

Summary

Indicates that the client has been initialized.

Nft property

Summary

DefiApi operations

Initialize(serverUrl) method

Summary

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

Parameters
Name Type Description
serverUrl System.String

StorageApi 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 StorageApi class.

Returns
Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an instance of ApiClient (optional)

#ctor() constructor

Summary

Initializes a new instance of the StorageApi 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
Name Type Description
basePath System.String The base path

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

UploadFolder(abi) method

Summary

Uploads multiple files and place them in a folder directory

Returns

Returns the path to the uploaded files

Parameters
Name Type Description
abi System.Collections.Generic.List{Moralis.Web3Api.Models.IpfsFileRequest} Array of JSON and Base64 Supported

StreamsApi type

Namespace

Moralis.StreamsApi.Api

#ctor(apiClient) constructor

Summary

Initializes a new instance of the class.

Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an instance of ApiClient (optional)

#ctor() constructor

Summary

Initializes a new instance of the class.

Parameters

This constructor has no parameters.

ApiClient property

Summary

BindStream(req) method

Summary

Creates a new stream

Returns

StreamBindingDto

Parameters
Name Type Description
req Moralis.StreamsApi.Models.StreamBindingDto StreamBindingDto
Exceptions
Name Description
Moralis.Network.ApiException

DeleteStream(streamId) method

Summary

Removes a specified atream binding.

Returns

StreamBindingDto

Parameters
Name Type Description
streamId System.String string
Exceptions
Name Description
Moralis.Network.ApiException

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

GetStream(streamId) method

Summary

Gets a specific stream definition.

Returns
Parameters
Name Type Description
streamId System.String
Exceptions
Name Description
System.NotImplementedException

GetStreams() method

Summary

Get all the stream definitions for the current project based on the project api-key.

Returns

StreamBindingDto List

Parameters

This method has no parameters.

Exceptions
Name Description
System.NotImplementedException

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

UpdateStream(req) method

Summary

Updates a specific stream.

Returns

StreamBindingDto

Parameters
Name Type Description
req Moralis.StreamsApi.Models.StreamBindingDto StreamBindingDto
Exceptions
Name Description
Moralis.Network.ApiException

ValidateUuid(uuid) method

Summary

Validates that the specified value qualifies as valid under RFC_4122

Returns

bool

Parameters
Name Type Description
uuid System.String string

StreamsApiClient type

Namespace

Moralis.StreamsApi.Client

Summary

Client that

#ctor() constructor

Summary

Default constructor.

Parameters

This constructor has no parameters.

#ctor(serverUrl) constructor

Summary

Initialize client using just server url.

Parameters
Name Type Description
serverUrl System.String

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
Name Type Description
serverUrl System.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
Name Type Description
signature System.String
requestBody System.String

StreamsResponse type

Namespace

Moralis.StreamsApi.Models

Summary

Response returned by a streams lookup.

Result property

Summary

The list of stream definitions

Total property

Summary

Total number of streams returned.

SupportedEvmChains type

Namespace

Moralis.Models

Summary

Provides a easy way to get detail about an EVM chain for all EVM chains supported by the Moralis Web3API

SupportedChains property

Summary

The list of EVM chains supported by the Moralis Web3API.

FromChainList(target) method

Summary

Retrieve an chain entry by enum value.

Returns

Moralis.Models.ChainEntry

Parameters
Name Type Description
target Moralis.Web3Api.Models.ChainList

FromChainList(target) method

Summary

Retrieve an chain entry by enum value.

Returns

Moralis.Models.ChainEntry

Parameters
Name Type Description
target System.String

FromChainList(target) method

Summary

Retrieve an chain entry by enum value.

Returns

Moralis.Models.ChainEntry

Parameters
Name Type Description
target System.Int32

PopulateChainList() method

Summary

Loops through the current ChainList enum and builds a friendly to use name / chainId, enum val entry.

Parameters

This method has no parameters.

TokenApi type

Namespace

Moralis.SolanaApi.Api

TokenApi 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 TokenApi class.

Returns
Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an instance of ApiClient (optional)

#ctor() constructor

Summary

Initializes a new instance of the TokenApi class.

Returns
Parameters

This constructor has no parameters.

#ctor(apiClient) constructor

Summary

Initializes a new instance of the TokenApi class.

Returns
Parameters
Name Type Description
apiClient Moralis.Network.ApiClient an instance of ApiClient (optional)

#ctor() constructor

Summary

Initializes a new instance of the TokenApi 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
Name Type Description
basePath System.String The base path

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

GetAllTokenIds(address,chain,format,cursor,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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
cursor System.String cursor
limit System.Nullable{System.Int32} limit

GetBasePath(basePath) method

Summary

Gets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

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

Summary

Gets the transfers of the tokens matching the given parameters

Returns

Returns a collection of NFT transfers

Parameters
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
cursor System.String cursor
limit System.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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
days System.Nullable{System.Int32} The number of days to look back to find the lowest price
If not provided 7 days will be the default
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)

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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query

GetNFTOwners(address,chain,format,cursor,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
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
cursor System.String cursor
limit System.Nullable{System.Int32} limit

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

Summary

Get the nft trades for a given contracts and marketplace

Returns

Returns the trades

Parameters
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query
fromBlock System.String 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} | 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) | | cursor | System.String | cursor | | limit | System.Nullable{System.Int32} | limit |

GetNftTransfersFromToBlock(chain,fromBlock,toBlock,fromDate,toDate,format,cursor,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
Name Type Description
chain Moralis.Web3Api.Models.ChainList The chain to query
fromBlock System.String 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.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 | | cursor | System.String | cursor | | 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
Name Type Description
address System.String The address of the token contract
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
fromBlock System.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
Name Type Description
address System.String The address of the token contract
ownerAddress System.String The address of the token owner
spenderAddress System.String The address of the token spender
chain Moralis.Web3Api.Models.ChainList The chain to query
providerUrl System.String web3 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
Name Type Description
address System.String Address of the contract
tokenId System.String The id of the token
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id

GetTokenIdOwners(address,tokenId,chain,format,cursor,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
Name Type Description
address System.String Address of the contract
tokenId System.String The id of the token
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
cursor System.String cursor
limit System.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
Name Type Description
addresses System.Collections.Generic.List{System.String} The addresses to get metadata for
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The subdomain of the moralis server to use (Only use when selecting local devchain as chain)
providerUrl System.String web3 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
Name Type Description
symbols System.Collections.Generic.List{System.String} The symbols to get metadata for
chain Moralis.Web3Api.Models.ChainList The chain to query
subdomain System.String The 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
Name Type Description
address System.String The address of the token contract
chain Moralis.Web3Api.Models.ChainList The chain to query
providerUrl System.String web3 provider url to user when using local dev chain
exchange System.String The factory name or address of the token exchange
toBlock System.Nullable{System.Int32} to_block

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

Summary

Gets the transfers of the tokens matching the given parameters

Returns

Returns a collection of NFT transfers

Parameters
Name Type Description
address System.String Address of the contract
tokenId System.String The id of the token
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
cursor System.String cursor
limit System.Nullable{System.Int32} limit
order System.String The 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
Name Type Description
address System.String Address of the contract
tokenId System.String The id of the token
chain Moralis.Web3Api.Models.ChainList The chain to query

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

Summary

Gets NFTs that match a given metadata search.

Returns

Returns the matching NFTs

Parameters
Name Type Description
q System.String The search string
chain Moralis.Web3Api.Models.ChainList The chain to query
format System.String The format of the token id
filter System.String What 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
fromBlock System.String The 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. | | cursor | System.String | cursor | | limit | System.Nullable{System.Int32} | limit |

SetBasePath(basePath) method

Summary

Sets the base path of the API client.

Parameters
Name Type Description
basePath System.String The base path

SyncNFTContract(address,chain) method

Summary

Sync a Contract for NFT Index

Returns
Parameters
Name Type Description
address System.String Address of the contract
chain Moralis.Web3Api.Models.ChainList The chain to query

Trade type

Namespace

Moralis.Web3Api.Models

BlockHash property

Summary

The block hash example: 0x4a7c916ca4a970358b9df90051008f729685ff05e9724a9dddba32630c37cb96

BlockNumber property

Summary

The blocknumber of the transaction example: 13680123

BlockTimestamp property

Summary

The block timestamp example: 6/4/2021 4:00:15 PM

BuyerAddress property

Summary

The address that bought the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

MarketplaceAddress property

Summary

The address of the contract that traded the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

Price property

Summary

The value that was sent in the transaction (ETH/BNB/etc..) example: 1000000000000000

SellerAddress property

Summary

The address that sold the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TokenIds property

Summary

The token id(s) traded

TransactionHash property

Summary

The transaction hash example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TransactionIndex property

Summary

The transaction index

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.

TradeCollection 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.

TradesCollection type

Namespace

Moralis.Web3Api.Models

BlockNumber property

Summary

The blocknumber of the transaction example: 88256

BlockTimestamp property

Summary

The block timestamp example: 6/4/2021 4:00:15 PM

FromAddress property

Summary

The address that sent the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

Gas property

Summary

The gas of the transaction example: 6721975

GasPrice property

Summary

The gas price example: 20000000000

ReceiptCumulativeGasUsed property

Summary

The receipt cumulative gas used example: 1340925

ReceiptGasUsed property

Summary

The receipt gas used example: 1340925

ToAddress property

Summary

The address that recieved the NFT example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TokenIds property

Summary

The token id(s) traded

TransactionHash property

Summary

The transaction hash example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

TransactionIndex property

Summary

The transaction index

Value property

Summary

The value that was sent in the transaction (ETH/BNB/etc..) example: 1000000000000000

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.

Transaction type

Namespace

Moralis.Web3Api.Models

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

Gas property

Summary

The gas of the transaction example: 6721975

GasPrice property

Summary

The gas price example: 20000000000

Hash property

Summary

The hash of the transaction example: 0x057Ec652A4F150f7FF94f089A38008f49a0DF88e

Input property

Summary

The input

Nonce property

Summary

The nonce of the transaction example: 326595425

ReceiptContractAddress property

Summary

The receipt contract address example: 0x1d6a4cf64b52f6c73f201839aded7379ce58059c

ReceiptCumulativeGasUsed property

Summary

The receipt cumulative gas used example: 1340925

ReceiptGasUsed property

Summary

The receipt gas used example: 1340925

ReceiptRoot property

Summary

The receipt root

ReceiptStatus property

Summary

The receipt status example: 1

ToAddress property

Summary

The recipient example: 0xa71db868318f0a0bae9411347cd4a6fa23d8d4ef

TransactionIndex property

Summary

The transaction index example: 25

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.

TransactionCollection 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.

UnitConversion type

Namespace

Moralis.Unit

Summary

Convert property

Summary

Current unit of conversion

FromWei() method

Summary

Converts from wei to a unit, NOTE: When the total number of digits is bigger than 29 they will be rounded the less significant digits

Parameters

This method has no parameters.

FromWei() method

Summary

Converts from wei to a unit, NOTE: When the total number of digits is bigger than 29 they will be rounded the less significant digits

Parameters

This method has no parameters.

FromWei() method

Summary

Converts from wei to a unit, NOTE: When the total number of digits is bigger than 29 they will be rounded the less significant digits

Parameters

This method has no parameters.

FromWeiToBigDecimal(value,decimalPlacesToUnit) method

Summary

Convert WEI value to BigDecimal.

Returns

BigDecimal

Parameters
Name Type Description
value System.Numerics.BigInteger BigInteger
decimalPlacesToUnit System.Int32 int

FromWeiToBigDecimal(value,toUnit) method

Summary

Convert WEI value to BigDecimal.

Returns

BigDecimal

Parameters
Name Type Description
value System.Numerics.BigInteger BigInteger
toUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

FromWeiToBigDecimal(value,toUnit) method

Summary

Convert WEI value to BigDecimal.

Returns

BigDecimal

Parameters
Name Type Description
value System.Numerics.BigInteger BigInteger
toUnit System.Numerics.BigInteger BigInteger

GetEthUnitValue(ethUnit) method

Summary

Numeric value of EthUnit

Returns

BigInteger

Parameters
Name Type Description
ethUnit Moralis.Unit.UnitConversion.EthUnit EthUnit
Exceptions
Name Description
System.NotImplementedException

GetEthUnitValueLength(unitValue) method

Summary

returns length of value.

Returns

int

Parameters
Name Type Description
unitValue System.Numerics.BigInteger BigInteger

ToWei(amount,fromUnit) method

Summary

Convert BigDecimal value to WEI

Returns

BigInteger

Parameters
Name Type Description
amount Moralis.Unit.BigDecimal BigDecimal
fromUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

ToWei(amount,decimalPlacesFromUnit) method

Summary

Convert BigDecimal value to WEI

Returns

BigInteger

Parameters
Name Type Description
amount Moralis.Unit.BigDecimal BigDecimal
decimalPlacesFromUnit System.Int32 int

ToWei(amount,decimalPlacesFromUnit) method

Summary

Convert decimal value to WEI

Returns

BigInteger

Parameters
Name Type Description
amount System.Decimal decimal
decimalPlacesFromUnit System.Int32 int

ToWei(amount,fromUnit) method

Summary

Convert decimal value to WEI

Returns

BigInteger

Parameters
Name Type Description
amount System.Decimal decinmal
fromUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

ToWei(value,fromUnit) method

Summary

Convert BigInteger value to WEI

Returns

BigInteger

Parameters
Name Type Description
value System.Numerics.BigInteger BigInteger
fromUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

ToWei(value,fromUnit) method

Summary

Convert int value to WEI

Returns

BigInteger

Parameters
Name Type Description
value System.Int32 int
fromUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

ToWei(value,fromUnit) method

Summary

Convert double value to WEI

Returns

BigInteger

Parameters
Name Type Description
value System.Double double
fromUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

ToWei(value,fromUnit) method

Summary

Convert float value to WEI

Returns

BigInteger

Parameters
Name Type Description
value System.Single float
fromUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

ToWei(value,fromUnit) method

Summary

Convert long value to WEI

Returns

BigInteger

Parameters
Name Type Description
value System.Int64 long
fromUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

ToWei(value,fromUnit) method

Summary

Convert string value to WEI

Returns

BigInteger

Parameters
Name Type Description
value System.String string
fromUnit Moralis.Unit.UnitConversion.EthUnit EthUnit

ToWeiFromUnit(amount,fromUnit) method

Summary

Convert decimal from unit

Returns

BigInteger

Parameters
Name Type Description
amount System.Decimal decimal
fromUnit System.Numerics.BigInteger BigInteger

ToWeiFromUnit(amount,fromUnit) method

Summary

Convert BigDecimal from unit

Returns

BigInteger

Parameters
Name Type Description
amount Moralis.Unit.BigDecimal BigDecimal
fromUnit System.Numerics.BigInteger BigInteger

TryValidateUnitValue(ethUnit) method

Summary

Valdiate that value in paower of 10

Returns

bool

Parameters
Name Type Description
ethUnit System.Numerics.BigInteger BigInteger
Exceptions
Name Description
System.Exception

Web3ApiClient type

Namespace

Moralis.Web3Api.Client

Summary

Provides a wrapper class around the Moralis Web3Api REST service. Automagically initializes client to use standard server or personal server Cloud Function API based on use of Api Key.

#ctor(serverUrl) constructor

Summary

Initialize client using just server url.

Parameters
Name Type Description
serverUrl System.String

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
Name Type Description
serverUrl System.String

WebRequest type

Namespace

Moralis.SolanaApi.Models

Summary
IHttpRequest

is an interface that provides an API to execute HTTP request data.

WebRequest type

Namespace

Moralis.Web3Api.Models

Summary
IHttpRequest

is an interface that provides an API to execute HTTP request data.

Data property

Summary

Data stream to be uploaded.

Method property

Summary

HTTP method. One of DELETE, GET, HEAD, POST or PUT

Data property

Summary

Data stream to be uploaded.

Method property

Summary

HTTP method. One of DELETE, GET, HEAD, POST or PUT

web3-dotnet-sdk's People

Contributors

dpradell-dev avatar ernow avatar ivan-liljeqvist avatar xactant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

web3-dotnet-sdk's Issues

JsonSerializer cannot be null

The default value of a jsonSerializer is null while the first line states that it can't be null.

    public MoralisClient(ServerConnectionData connectionData, IAuthClientApi authApi = null, IWeb3Api web3Api = null, ISolanaApi solanaApi = null, IJsonSerializer jsonSerializer = null)
    {
        if (jsonSerializer == null)
        {
            throw new ArgumentException("jsonSerializer cannot be null.");
        }

MoralisClient.Web3Api.Token.GetTokenMetadata fails when multiple addresses

Since api isn't accepting param array chained with " , "

Example not working => returns "message": "addresses is not a valid hex address"

https://deep-index.moralis.io/api/v2/erc20/metadata?addresses=0X720ABD02E351F79CEFA90B6A9201B366B502E89C,0x1659fFb2d40DfB1671Ac226A0D9Dcc95A774521A&chain=polygon

Working Example
it needs to be chained with addresses separator per item.

https://deep-index.moralis.io/api/v2/erc20/metadata?addresses=0X720ABD02E351F79CEFA90B6A9201B366B502E89C&addresses=0x1659fFb2d40DfB1671Ac226A0D9Dcc95A774521A&chain=polygon

Posible fixes on SDK
On
File: TokenApi.cs

public async Task<List> GetTokenMetadata
line 118
var parametersFixed = String.Join("&addresses=", ApiClient.ParameterToString(addresses).Split(","));
if (addresses != null) queryParams.Add("addresses", parametersFixed);
...

On
File: ApiClient.cs
Add separator param

 public string ParameterToString(object obj, string separator = ",")
       {
           if (obj is DateTime)
               // Return a formatted date string - Can be customized with Configuration.DateTimeFormat
               // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
               // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
               // For example: 2009-06-15T13:45:30.0000000
               return ((DateTime)obj).ToString(Configuration.DateTimeFormat);
           else if (obj is List<string>)
                return String.Join(separator, (obj as List<string>).ToArray());
            else if (obj is string || obj is int || obj is long || obj is decimal || obj is bool || obj is float || obj is double || obj is byte || obj is char)
            {
                return obj.ToString();
            }
            else
                return JsonConvert.SerializeObject(obj);
        }

And called:

if (addresses != null) queryParams.Add("addresses", ApiClient.ParameterToString(addresses, "&addresses="));

Adding a step-by-step guide in the ReadMe of this repository

Hey guys,

It's amazing to see that there is now a .NET SDK for Moralis. It should bring in a lot of .NET, Blazor and Unity devs.

I think it would be great to add a step-by-step guide to the ReadMe, similar to what is currently in the ethereum-boilerplate repo but specifically for the C# SDK. Happy to do it/participate, I've used the SDK to make a Discord bot so far.

Nuget package is not updated

Hello!
The nuget package is not updated with the latest changes.
GetNfts is not using async/await pattern in the nuget version.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.