From 3dcae362ca8f14b6fe286e19b8522bc030bcd846 Mon Sep 17 00:00:00 2001 From: productshiv Date: Sat, 6 Apr 2024 21:00:09 +0530 Subject: [PATCH] Adding Stellar --- v1.0/RPC Nodes/rpc-others/rpc-stellar.md | 8 + .../rpc-stellar/rpc-stellar-getaccount.md | 159 ++++++ .../rpc-stellar/rpc-stellar-getaccountdata.md | 65 +++ .../rpc-stellar-getaccounteffects.md | 117 +++++ .../rpc-stellar-getaccountoffers.md | 152 ++++++ .../rpc-stellar-getaccountoperations.md | 141 ++++++ .../rpc-stellar-getaccountpayments.md | 131 +++++ .../rpc-stellar/rpc-stellar-getaccounts.md | 199 ++++++++ .../rpc-stellar-getaccounttrades.md | 145 ++++++ .../rpc-stellar-getaccounttransactions.md | 164 ++++++ .../rpc-stellar/rpc-stellar-getassets.md | 133 +++++ .../rpc-stellar-getclaimablebalance.md | 113 +++++ .../rpc-stellar-getclaimablebalances.md | 133 +++++ .../rpc-stellar/rpc-stellar-geteffects.md | 116 +++++ .../rpc-stellar/rpc-stellar-getfeestats.md | 88 ++++ .../rpc-stellar/rpc-stellar-getledger.md | 101 ++++ .../rpc-stellar-getledgereffects.md | 112 +++++ .../rpc-stellar-getledgeroperations.md | 146 ++++++ .../rpc-stellar-getledgerpayments.md | 471 ++++++++++++++++++ .../rpc-stellar/rpc-stellar-getledgers.md | 128 +++++ .../rpc-stellar-getledgertransactions.md | 145 ++++++ .../rpc-stellar-getliquiditypool.md | 102 ++++ .../rpc-stellar-getliquiditypooleffects.md | 101 ++++ .../rpc-stellar-getliquiditypooloperations.md | 171 +++++++ .../rpc-stellar-getliquiditypools.md | 137 +++++ .../rpc-stellar-getliquiditypooltrades.md | 132 +++++ ...pc-stellar-getliquiditypooltransactions.md | 177 +++++++ .../rpc-stellar/rpc-stellar-getoffer.md | 97 ++++ .../rpc-stellar/rpc-stellar-getoffers.md | 159 ++++++ .../rpc-stellar/rpc-stellar-getoffertrades.md | 137 +++++ .../rpc-stellar/rpc-stellar-getoperation.md | 127 +++++ .../rpc-stellar-getoperationeffects.md | 120 +++++ .../rpc-stellar/rpc-stellar-getoperations.md | 142 ++++++ .../rpc-stellar/rpc-stellar-getorderbook.md | 173 +++++++ .../rpc-stellar/rpc-stellar-getpayments.md | 162 ++++++ ...pc-stellar-getstrictreceivepaymentpaths.md | 194 ++++++++ .../rpc-stellar-getstrictsendpaymentpaths.md | 142 ++++++ .../rpc-stellar-gettradeaggregations.md | 188 +++++++ .../rpc-stellar/rpc-stellar-gettrades.md | 155 ++++++ .../rpc-stellar/rpc-stellar-gettransaction.md | 113 +++++ .../rpc-stellar-gettransactioneffects.md | 143 ++++++ .../rpc-stellar-gettransactionoperations.md | 145 ++++++ .../rpc-stellar-gettransactions.md | 149 ++++++ .../rpc-stellar-submittransaction.md | 124 +++++ 44 files changed, 6257 insertions(+) create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoffers.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoperations.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountpayments.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounts.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttrades.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttransactions.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getassets.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalance.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalances.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-geteffects.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getfeestats.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledger.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgereffects.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgeroperations.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgerpayments.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgers.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgertransactions.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypool.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooleffects.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooloperations.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypools.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltrades.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltransactions.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffer.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffers.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffertrades.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperation.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperationeffects.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperations.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getorderbook.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getpayments.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictreceivepaymentpaths.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictsendpaymentpaths.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettradeaggregations.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettrades.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransaction.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactioneffects.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactionoperations.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactions.md create mode 100644 v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-submittransaction.md diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar.md new file mode 100644 index 00000000..abe6a97c --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar.md @@ -0,0 +1,8 @@ +--- +title: "Stellar" +slug: "rpc-stellar" +excerpt: "" +hidden: false +createdAt: "Wed Mar 06 2024 10:35:18 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Wed Mar 06 2024 13:09:53 GMT+0000 (Coordinated Universal Time)" +--- diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.md new file mode 100644 index 00000000..1b9f5cd7 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccount.md @@ -0,0 +1,159 @@ +--- +title: "getAccount" +slug: "rpc-stellar-getaccount" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 12:59:44 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define the account ID (Replace placeholder with the actual account ID) +const accountId = "YOUR_ACCOUNT_ID"; + +// Retrieve details of a specific account +const accountDetails = await tatum.rpc.getAccount(accountId); + +// Log the account details +console.log("Account Details:", accountDetails); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccount` method allows you to retrieve detailed information about a specific account. This includes information about balances and trustlines, including those that haven't been authorized yet. + +### Example use cases: + +1. **Account Information:** + Developers and applications can use this method to access detailed information about a specific account, including its balances and trustlines. + +2. **Trustline Analysis:** + You can use the response to analyze the trustlines established by the account, including those that haven't been authorized yet. + +### Request Parameters + +The `getAccount` method requires the following parameter: + +- `accountId` (string, required): + The unique identifier (account ID) of the account for which you want to retrieve details. + +### Return Object + +The `getAccount` method returns a JSON object containing details about the specified account, including balances, sponsorships, and other relevant information. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U" + }, + "transactions": { + "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/transactions{?cursor,limit,order}", + "templated": true + }, + "operations": { + "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/operations{?cursor,limit,order}", + "templated": true + }, + "payments": { + "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/payments{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/effects{?cursor,limit,order}", + "templated": true + }, + "offers": { + "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/offers{?cursor,limit,order}", + "templated": true + }, + "trades": { + "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/trades{?cursor,limit,order}", + "templated": true + }, + "data": { + "href": "https://horizon.stellar.org/accounts/GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U/data/{key}", + "templated": true + } + }, + "id": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", + "account_id": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", + "sequence": "24739097524306468", + "subentry_count": 3, + "inflation_destination": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", + "home_domain": "tempo.eu.com", + "last_modified_ledger": 23569316, + "num_sponsoring": 0, + "num_sponsored": 0, + "thresholds": { + "low_threshold": 5, + "med_threshold": 0, + "high_threshold": 0 + }, + "flags": { + "auth_required": false, + "auth_revocable": true, + "auth_immutable": false, + "auth_clawback_enabled": true + }, + "balances": [ + { + "balance": "1.0000005", + "limit": "922337203685.4775807", + "buying_liabilities": "0.0000000", + "selling_liabilities": "0.0000000", + "last_modified_ledger": 22651481, + "is_authorized": true, + "is_clawback_enabled": false, + "asset_type": "credit_alphanum4", + "asset_code": "EURT", + "asset_issuer": "GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + }, + { + "balance": "0.0000000", + "limit": "922337203685.4775807", + "buying_liabilities": "0.0000000", + "selling_liabilities": "0.0000000", + "last_modified_ledger": 7877447, + "is_authorized": false, + "is_clawback_enabled": false, + "asset_type": "credit_alphanum4", + "asset_code": "PHP", + "asset_issuer": "GBUQWP3BOUZX34TOND2QV7QQ7K7VJTG6VSE7WMLBTMDJLLAW7YKGU6EP" + } + ], + "signers": [ + { + "weight": 10, + "key": "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U", + "type": "ed25519_public_key" + } + ], + "data": {}, + "paging_token": "" +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.md new file mode 100644 index 00000000..2537fe24 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountdata.md @@ -0,0 +1,65 @@ +--- +title: "getAccountData" +slug: "rpc-stellar-getaccountdata" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const params = { + accountId: "YOUR_ACCOUNT_ID", + key: "YOUR_DATA_KEY", +}; + +// Retrieve data for a specific key of a given account +const data = await tatum.rpc.getAccountData(params); + +// Log the data value +console.log("Account Data:", data.value); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountData` method allows you to retrieve a single data value for a specific key of a given account on the Stellar blockchain. Please note that the content and structure of the data returned can vary based on the specific use case and applications interacting with the Stellar blockchain. + +### Request Parameters + +The `getAccountData` method accepts the following request parameters: + +- `accountId` (string, required): + The unique identifier (account ID) of the account for which you want to retrieve data. + +- `key` (string, required): + The data key for which you want to retrieve the corresponding value. + +### Return Object + +The `getAccountData` method returns a JSON object with account data: + +`value` (string): +The value associated with the specified data key for the given account. diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.md new file mode 100644 index 00000000..2b881301 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounteffects.md @@ -0,0 +1,117 @@ +--- +title: "getAccountEffects" +slug: "rpc-stellar-getaccounteffects" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const inputParams = { + accountId: "YOUR_ACCOUNT_ID", + cursor: "now", + order: "asc", + limit: 10, +}; + +// Retrieve effects of a specific account +const effects = await tatum.rpc.getAccountEffects(inputParams); + +// Log the list of effects +console.log("Account Effects:", effects); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountEffects` method allows you to retrieve the effects of a specific account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new effects for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known effect unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream effects created since your request time. + +### Request Parameters + +The `getAccountEffects` method accepts the following request parameters: + +- `accountId` (string, required): + The unique identifier (account ID) of the account for which you want to retrieve effects. + +- `cursor` (string, optional): + A cursor value that determines the starting point for retrieving effects. Set it to 'now' to stream effects created since your request time. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of effects to fetch in a single request. + +### Return Object + +The `getAccountEffects` method returns a JSON object containing the list of effects associated with the specified account. Each effect represents an event that has occurred on the Stellar blockchain, such as the creation of an account, a payment, or other actions. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://.." + }, + "next": { + "href": "https://.." + }, + "prev": { + "href": "https://.." + } + }, + "_embedded": { + "records": [ + { + "_links": { + "operation": { + "href": "https://..." + }, + "succeeds": { + "href": "https://..." + }, + "precedes": { + "href": "https://..." + } + }, + "id": "0216517620744060929-0000000002", + "paging_token": "216517620744060929-2", + "account": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", + "type": "claimable_balance_claimant_created", + "type_i": 51, + "created_at": "2024-02-17T14:03:50Z", + "asset": "ENIZ:GDLMUA4ZQSU3LMKEW7LETSIYLYMATTGVPXCHFRRTGQTF6K55XOQIENIZ", + "balance_id": "000000004c56a7b5e98e7d5225f37d27fbd93c4fe2f03b00d2c80d23771ae97e66f599c7", + "amount": "5000.0000000", + "predicate": { + "unconditional": true + } + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoffers.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoffers.md new file mode 100644 index 00000000..abfe3a99 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoffers.md @@ -0,0 +1,152 @@ +--- +title: "getAccountOffers" +slug: "rpc-stellar-getaccountoffers" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const params = { + accountId: "YOUR_ACCOUNT_ID", + cursor: "now", + order: "asc", + limit: 10, +}; + +// Retrieve all offers currently open for a given account +const offers = await tatum.rpc.getAccountOffers(params); + +// Log the list of offers +console.log("Account Offers:", offers); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountOffers` method allows you to retrieve all offers that a specific account has currently open on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new offers for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known offer unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream offers created since your request time. + +### Request Parameters + +The `getAccountOffers` method accepts the following request parameters: + +- `accountId` (string, required): + The unique identifier (account ID) of the account for which you want to retrieve offers. + +- `cursor` (string, optional): + A cursor value that determines the starting point for retrieving offers. Set it to 'now' to stream offers created since your request time. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of offers to fetch in a single request. + +### Return Object + +The `getAccountOffers` method returns a JSON object containing the list of offers associated with the specified account. Each offer represents an open order on the Stellar network, such as a trade offer to exchange one asset for another. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_links": { + "self": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=164943216&limit=10&order=asc" + }, + "prev": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/offers?cursor=164555927&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://horizon.stellar.org/offers/164555927" + }, + "offer_maker": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" + } + }, + "id": 164555927, + "paging_token": "164555927", + "seller": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K", + "selling": { + "asset_type": "native" + }, + "buying": { + "asset_type": "credit_alphanum4", + "asset_code": "BB1", + "asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN" + }, + "amount": "214.9999939", + "price_r": { + "n": 10000000, + "d": 86000001 + }, + "price": "0.1162791", + "last_modified_ledger": 28383147, + "last_modified_time": "2020-02-24T22:58:38Z" + }, + { + "_links": { + "self": { + "href": "https://horizon.stellar.org/offers/164943216" + }, + "offer_maker": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" + } + }, + "id": 164943216, + "paging_token": "164943216", + "seller": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K", + "selling": { + "asset_type": "credit_alphanum4", + "asset_code": "BB1", + "asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN" + }, + "buying": { + "asset_type": "native" + }, + "amount": "24.9999990", + "price_r": { + "n": 32224991, + "d": 2500000 + }, + "price": "12.8899964", + "last_modified_ledger": 28394149, + "last_modified_time": "2020-02-25T15:49:57Z" + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoperations.md new file mode 100644 index 00000000..d260ce11 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountoperations.md @@ -0,0 +1,141 @@ +--- +title: "getAccountOperations" +slug: "rpc-stellar-getaccountoperations" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const params = { + accountId: "YOUR_ACCOUNT_ID", + cursor: "now", + order: "asc", + limit: 10, + includeFailed: true, + join: true, +}; + +// Retrieve successful operations for a given account +const operations = await tatum.rpc.getAccountOperations(params); + +// Log the list of operations +console.log("Account Operations:", operations); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountOperations` method allows you to retrieve successful operations for a given account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new operations for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known operation unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream operations created since your request time. + +### Request Parameters + +The `getAccountOperations` method accepts the following request parameters: + +- `accountId` (string, required): + The unique identifier (account ID) of the account for which you want to retrieve operations. + +- `cursor` (string, optional): + A cursor value that determines the starting point for retrieving operations. Set it to 'now' to stream operations created since your request time. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of operations to fetch in a single request. + +- `includeFailed` (boolean, optional): + A flag to indicate whether to include failed operations in the results. Set to `true` to include failed operations. + +- `join` (boolean, optional): + A flag to indicate whether to join operation data with relevant accounts. Set to `true` to join operation data with accounts. + +### Return Object + +The `getAccountOperations` method returns a JSON object containing the list of operations associated with the specified account. Each operation may represent a variety of actions such as payments, account creations, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/operations?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/operations?cursor=216532408316960769&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/operations?cursor=216517620744060929&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/216517620744060929" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/8ed978ce9f9f2cfe245470a06e9d0ce178f0cc602fd2b8d5e6047192e13d7475" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/216517620744060929/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=216517620744060929" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=216517620744060929" + } + }, + "id": "216517620744060929", + "paging_token": "216517620744060929", + "transaction_successful": true, + "source_account": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", + "type": "create_claimable_balance", + "type_i": 14, + "created_at": "2024-02-17T14:03:50Z", + "transaction_hash": "8ed978ce9f9f2cfe245470a06e9d0ce178f0cc602fd2b8d5e6047192e13d7475", + "sponsor": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", + "asset": "ENIZ:GDLMUA4ZQSU3LMKEW7LETSIYLYMATTGVPXCHFRRTGQTF6K55XOQIENIZ", + "amount": "5000.0000000", + "claimants": [ + { + "destination": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", + "predicate": { + "unconditional": true + } + }, + { + "destination": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", + "predicate": { + "unconditional": true + } + } + ] + } +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountpayments.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountpayments.md new file mode 100644 index 00000000..ff577f54 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccountpayments.md @@ -0,0 +1,131 @@ +--- +title: "getAccountPayments" +slug: "rpc-stellar-getaccountpayments" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const params = { + accountId: "YOUR_ACCOUNT_ID", + cursor: "now", + order: "asc", + limit: 10, + includeFailed: true, + join: true, +}; + +// Retrieve successful payments for a given account +const payments = await tatum.rpc.getAccountPayments(params); + +// Log the list of payments +console.log("Account Payments:", payments); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountPayments` method allows you to retrieve successful payments for a given account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new payments for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known payment unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream payments created since your request time. + +### Request Parameters + +The `getAccountPayments` method accepts the following request parameters: + +- `accountId` (string, required): + The unique identifier (account ID) of the account for which you want to retrieve payments. + +- `cursor` (string, optional): + A cursor value that determines the starting point for retrieving payments. Set it to 'now' to stream payments created since your request time. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of payments to fetch in a single request. + +- `includeFailed` (boolean, optional): + A flag to indicate whether to include failed payments in the results. Set to `true` to include failed payments. + +- `join` (boolean, optional): + A flag to indicate whether to join payment data with relevant accounts. Set to `true` to join payment data with accounts. + +### Return Object + +The `getAccountPayments` method returns a JSON object containing the list of payments associated with the specified account. Each payment includes details such as its source, destination, amount, and other relevant information. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/payments?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/payments?cursor=216532408316960769&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/payments?cursor=216518179090239489&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/216518179090239489" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/57d2fccfb885169155913177f74d390a6675fcc28ccab529b8848cfcb1882435" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/216518179090239489/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=216518179090239489" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=216518179090239489" + } + }, + "id": "216518179090239489", + "paging_token": "216518179090239489", + "transaction_successful": true, + "source_account": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", + "type": "payment", + "type_i": 1, + "created_at": "2024-02-17T14:16:35Z", + "transaction_hash": "57d2fccfb885169155913177f74d390a6675fcc28ccab529b8848cfcb1882435", + "asset_type": "native", + "from": "GBOXZWWNZL3MQ7EP3KNL66WBVE4NH2UOLCMFKEKZFYQT5MOP2JDKENIZ", + "to": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", + "amount": "0.0000100" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounts.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounts.md new file mode 100644 index 00000000..9a16e0c2 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounts.md @@ -0,0 +1,199 @@ +--- +title: "getAccounts" +slug: "rpc-stellar-getaccounts" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define the account filters (Replace placeholders with actual values and remove redundant) +const filters: AccountFilters = { + sponsor: "YOUR_SPONSOR_ACCOUNT_ID", + asset: "YOUR_ASSET_CODE:ISSUER_ACCOUNT_ID", + signer: "YOUR_SIGNER_ACCOUNT_ID", + liquidityPool: "YOUR_LIQUIDITY_POOL_ID", + cursor: 6606617478959105, + order: "asc", + limit: 10, +}; + +// List accounts based on the specified filters +const accounts = await tatum.rpc.getAccounts(filters); + +// Log the list of accounts +console.log("List of Accounts:", accounts); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccounts` method allows you to retrieve a list of accounts based on various filters, including signer, asset, liquidity pool, or sponsor. + +**Please ensure that you are including a signer, sponsor, asset, or liquidity pool filter**. + +### Example use cases: + +1. **Account Filtering:** + Developers and applications can use this method to filter and retrieve accounts based on specific criteria, such as signer, asset, or sponsor. + +2. **Data Analysis:** + Researchers and analysts can utilize this endpoint to gather account data for analysis and reporting. + +3. **Pagination Support:** + The method supports pagination using the `cursor`, `order`, and `limit` parameters for efficient data retrieval. + +### Request Parameters + +The `getAccounts` method requires the following parameters in camelCase: + +- `sponsor` (string, optional): + Account ID of the sponsor. Every account in the response will either be sponsored by the given account ID or have a subentry (trustline, offer, or data entry) which is sponsored by the given account ID. + +- `asset` (string, optional): + An issued asset represented as "code:issuerAccountID". Every account in the response will have a trustline for the given asset. + +- `signer` (string, optional): + Account ID of the signer. Every account in the response will have the given account ID as a signer. + +- `liquidityPool` (string, optional): + With this parameter, the results will include only accounts which have trustlines to the specified liquidity pool. + +- `cursor` (number, optional): + A number that points to a specific location in a collection of responses and is pulled from the `pagingToken` value of a record. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include "asc" (ascending) or "desc" (descending). If this argument isn’t set, it defaults to "asc". + +- `limit` (number, optional): + The maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10. + +### Return Object + +The `getAccounts` method returns a list of accounts based on the provided filters. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://horizon.stellar.org/accounts?asset=USDC%3AGA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN&cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://horizon.stellar.org/accounts?asset=USDC%3AGA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN&cursor=GA223H7O26KC7NWDEH6R4D5ITI35I4R7BH5VDLPFTSKMWH2RUZD474TJ&limit=10&order=asc" + }, + "prev": { + "href": "https://horizon.stellar.org/accounts?asset=USDC%3AGA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN&cursor=GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6" + }, + "transactions": { + "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/transactions{?cursor,limit,order}", + "templated": true + }, + "operations": { + "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/operations{?cursor,limit,order}", + "templated": true + }, + "payments": { + "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/payments{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/effects{?cursor,limit,order}", + "templated": true + }, + "offers": { + "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/offers{?cursor,limit,order}", + "templated": true + }, + "trades": { + "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/trades{?cursor,limit,order}", + "templated": true + }, + "data": { + "href": "https://horizon.stellar.org/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/data/{key}", + "templated": true + } + }, + "id": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", + "account_id": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", + "sequence": "194013564070002690", + "sequence_ledger": 45173210, + "sequence_time": "1677700612", + "subentry_count": 1, + "last_modified_ledger": 50415380, + "last_modified_time": "2024-02-17T19:44:28Z", + "thresholds": { + "low_threshold": 0, + "med_threshold": 0, + "high_threshold": 0 + }, + "flags": { + "auth_required": false, + "auth_revocable": false, + "auth_immutable": false, + "auth_clawback_enabled": false + }, + "balances": [ + { + "balance": "0.0000000", + "limit": "922337203685.4775807", + "buying_liabilities": "0.0000000", + "selling_liabilities": "0.0000000", + "last_modified_ledger": 45173210, + "is_authorized": true, + "is_authorized_to_maintain_liabilities": true, + "asset_type": "credit_alphanum4", + "asset_code": "USDC", + "asset_issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN" + }, + { + "balance": "2.9975391", + "buying_liabilities": "0.0000000", + "selling_liabilities": "0.0000000", + "asset_type": "native" + } + ], + "signers": [ + { + "weight": 1, + "key": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6", + "type": "ed25519_public_key" + } + ], + "data": {}, + "num_sponsoring": 0, + "num_sponsored": 0, + "paging_token": "GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6" + } +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttrades.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttrades.md new file mode 100644 index 00000000..9065cc44 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttrades.md @@ -0,0 +1,145 @@ +--- +title: "getAccountTrades" +slug: "rpc-stellar-getaccounttrades" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const params = { + accountId: "YOUR_ACCOUNT_ID", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// Retrieve all trades for a specific account +const trades = await tatum.rpc.getTradesByAccountId(params); + +// Log the list of trades +console.log("Trades:", trades); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountTrades` method allows you to retrieve all trades associated with a specific account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new trades as they are added to the Stellar ledger. When used in streaming mode, it starts at the earliest known trade unless a cursor is set, in which case it starts from that cursor. You can also set the cursor value to 'now' to stream trades created since your request time. + +### Request Parameters + +The `getAccountTrades` method accepts the following request parameters: + +- `accountId` (string, required): + The unique identifier (account ID) of the account for which you want to retrieve trades. + +- `cursor` (string, optional): + A cursor value that determines the starting point for pagination. Use this parameter to retrieve trades from a specific point in the trade list. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of trades to fetch in a single request. + +### Return Object + +The `getAccountTrades` method returns a JSON object containing the list of trades associated with the specified account. Each trade is represented as an object with various properties describing its details. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_links": { + "self": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/trades?cursor=&limit=3&order=asc" + }, + "next": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/trades?cursor=107449584845914113-0&limit=3&order=asc" + }, + "prev": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K/trades?cursor=107449468881756161-0&limit=3&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "" + }, + "base": { + "href": "https://horizon.stellar.org/accounts/GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX" + }, + "counter": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" + }, + "operation": { + "href": "https://horizon.stellar.org/operations/107449468881756161" + } + }, + "id": "107449468881756161-0", + "paging_token": "107449468881756161-0", + "ledger_close_time": "2019-07-26T09:17:02Z", + "trade_type": "orderbook", + "base_offer_id": "104078276", + "base_account": "GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX", + "base_amount": "4433.2000000", + "base_asset_type": "native", + "counter_offer_id": "4719135487309144065", + "counter_account": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K", + "counter_amount": "443.3200000", + "counter_asset_type": "credit_alphanum4", + "counter_asset_code": "BB1", + "counter_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "base_is_seller": true, + "price": { + "n": "1", + "d": "10" + } + }, + { + "_links": { + "self": { + "href": "" + }, + "base": { + "href": "https://horizon.stellar.org/accounts/GCQDOTIILRG634IRWAODTUS6H6Q7VUUNKZINBDJOXGJFR7YZ57FGYV7B" + }, + "counter": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" + }, + "operation": { + "href": "https://horizon.stellar.org/operations/107449486061649921" + } + } + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttransactions.md new file mode 100644 index 00000000..47fb5eb7 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getaccounttransactions.md @@ -0,0 +1,164 @@ +--- +title: "getAccountTransactions" +slug: "rpc-stellar-getaccounttransactions" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const params = { + accountId: "YOUR_ACCOUNT_ID", + cursor: "now", + order: "asc", + limit: 10, + includeFailed: true, +}; + +// Retrieve successful transactions for a given account +const transactions = await tatum.rpc.getAccountTransactions(params); + +// Log the list of transactions +console.log("Account Transactions:", transactions); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAccountTransactions` method allows you to retrieve successful transactions for a given account on the Stellar blockchain. You can use this endpoint in streaming mode to listen for new transactions for the specified account as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known transaction unless a cursor is set, in which case it will start from that cursor. Setting the cursor value to 'now' allows you to stream transactions created since your request time. + +### Example use cases: + +1. **Transaction History:** + Developers and applications can use this method to retrieve the transaction history for a specific Stellar account. + +2. **Real-time Transaction Monitoring:** + By using streaming mode with the appropriate cursor, you can monitor and react to new transactions in real-time. + +### Request Parameters + +The `getAccountTransactions` method accepts the following parameters: + +- `accountId` (string, required): + The unique identifier (account ID) of the account for which you want to retrieve transactions. + +- `cursor` (string, optional): + A cursor value that determines the starting point for retrieving transactions. Set it to 'now' to stream transactions created since your request time. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of transactions to fetch in a single request. + +- `includeFailed` (boolean, optional): + A flag to indicate whether to include failed transactions in the results. Set to `true` to include failed transactions. + +### Return Object + +The `getAccountTransactions` method returns a JSON object containing the list of transactions associated with the specified account. Each transaction includes details such as its source, destination, amount, and other relevant information. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/transactions?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/transactions?cursor=216532408316960768&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA2224DCGO3WHC4EALA2PR2BZEMAYZPBPTHS243ZYYWQMBWRPJSZH5A6/transactions?cursor=216517620744060928&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "memo": "Check ENIZ.IO Airdrop", + "memo_bytes": "Q2hlY2sgRU5JWi5JTyBBaXJkcm9w", + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16" + }, + "account": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GB5NGIDRDXRMBRSLT7FTZ47CBUZXCWL6LYOLBH6ZYCXR6NCNJTE2ENIZ" + }, + "ledger": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/50415380" + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16/operations{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16/effects{?cursor,limit,order}", + "templated": true + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=asc&cursor=216532408316960768" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=desc&cursor=216532408316960768" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16" + } + }, + "id": "36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16", + "paging_token": "216532408316960768", + "successful": true, + "hash": "36de204075c7e3167e8f6d1ecc10d18c6277e2fea0ab983a894f16bb81bd5f16", + "ledger": 50415380, + "created_at": "2024-02-17T19:44:28Z", + "source_account": "GB5NGIDRDXRMBRSLT7FTZ47CBUZXCWL6LYOLBH6ZYCXR6NCNJTE2ENIZ", + "source_account_sequence": "215074769429599166", + "fee_account": "GB5NGIDRDXRMBRSLT7FTZ47CBUZXCWL6LYOLBH6ZYCXR6NCNJTE2ENIZ", + "fee_charged": "10000", + "max_fee": "1000500", + "operation_count": 100, + "envelope_xdr": "Hex data", + "result_xdr": "Hex data", + "result_meta_xdr": "Hex data", + "fee_meta_xdr": "Hex data", + "memo_type": "text", + "signatures": [ + "yroAw0Hl/cWJymRofDN5jHkeknbBp8I5Uuq/+VGgAOL1bwVDEL7SHCYUcmCix96mIXUwln4yaeTb1v505AvtBA==" + ], + "valid_after": "1970-01-01T00:00:00Z", + "valid_before": "2024-02-17T19:45:53Z", + "preconditions": { + "timebounds": { + "min_time": "0", + "max_time": "1708199153" + } + } + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getassets.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getassets.md new file mode 100644 index 00000000..027cb658 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getassets.md @@ -0,0 +1,133 @@ +--- +title: "getAssets" +slug: "rpc-stellar-getassets" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const inputParams = { + assetCode: "YOUR_ASSET_CODE", + assetIssuer: "YOUR_ASSET_ISSUER", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// Retrieve a list of all assets +const assets = await tatum.rpc.getAssets(inputParams); + +// Log the list of assets +console.log("Assets:", assets); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getAssets` method allows you to retrieve a list of all assets on the Stellar blockchain. You can use various filtering options to narrow down the asset list based on asset code, asset issuer, cursor for pagination, sorting order, and limit for the number of records to be returned. + +### Request Parameters + +The `getAssets` method accepts the following request parameters: + +- `assetCode` (string, optional): + The asset code for filtering assets by code. Use this parameter to list assets with a specific code. + +- `assetIssuer` (string, optional): + The asset issuer for filtering assets by issuer. Use this parameter to list assets issued by a specific account. + +- `cursor` (string, optional): + A cursor value that determines the starting point for pagination. Use this parameter to retrieve assets from a specific point in the asset list. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of assets to fetch in a single request. + +### Return Object + +The `getAssets` method returns a JSON object containing the list of assets that match the specified criteria. Each asset is represented as an object with various properties describing its characteristics. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/assets?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/assets?cursor=0001_GB7L7CB7F5R7GXXI2VY3AUHDIBGWHUB2SAYO7NPERUCQO4F35G62DBAR_credit_alphanum4&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/assets?cursor=0_GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT_credit_alphanum4&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "toml": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/.well-known/stellar.toml" + } + }, + "asset_type": "credit_alphanum4", + "asset_code": "0", + "asset_issuer": "GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT", + "paging_token": "0_GBBJZOYEGLOCW32Q4ZGWRWQ7UKIGMMIQXIRBBBOVJVFJTZW7CR2VQKAT_credit_alphanum4", + "num_accounts": 24, + "num_claimable_balances": 0, + "num_liquidity_pools": 0, + "num_contracts": 0, + "num_archived_contracts": 0, + "amount": "998.9481303", + "accounts": { + "authorized": 24, + "authorized_to_maintain_liabilities": 0, + "unauthorized": 0 + }, + "claimable_balances_amount": "0.0000000", + "liquidity_pools_amount": "0.0000000", + "contracts_amount": "0.0000000", + "archived_contracts_amount": "0.0000000", + "balances": { + "authorized": "998.9481303", + "authorized_to_maintain_liabilities": "0.0000000", + "unauthorized": "0.0000000" + }, + "flags": { + "auth_required": false, + "auth_revocable": false, + "auth_immutable": false, + "auth_clawback_enabled": false + } + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalance.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalance.md new file mode 100644 index 00000000..9212041c --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalance.md @@ -0,0 +1,113 @@ +--- +title: "getClaimableBalance" +slug: "rpc-stellar-getclaimablebalance" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define the claimable balance ID (Replace 'YOUR_CLAIMABLE_BALANCE_ID' with the actual claimable balance ID) +const claimableBalanceId = "YOUR_CLAIMABLE_BALANCE_ID"; + +// Retrieve information about a specific claimable balance +const claimableBalance = await tatum.rpc.getClaimableBalance( + claimableBalanceId +); + +// Log the claimable balance details +console.log("Claimable Balance:", claimableBalance); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getClaimableBalance` method allows you to retrieve information about a specific claimable balance on the Stellar blockchain. You need to provide the claimable balance ID to identify the balance you want to retrieve. + +### Request Parameters + +The `getClaimableBalance` method accepts the following request parameters: + +- `claimableBalanceId` (string, required): + The unique identifier of the claimable balance you want to retrieve. + +### Return Object + +The `getClaimableBalance` method returns a JSON object containing the details of the requested claimable balance. The object includes various properties describing the characteristics of the claimable balance. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=33494305-000000006f6cd6031f3e4fcdfb795412cc0f1ffd45663098691f5eff88ff9b6cff1006a0&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=32747318-00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9" + }, + "transactions": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/transactions{?cursor,limit,order}", + "templated": true + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations{?cursor,limit,order}", + "templated": true + } + }, + "id": "00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9", + "asset": "BODHI:GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF", + "amount": "0.1000000", + "sponsor": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF", + "last_modified_ledger": 32747318, + "last_modified_time": null, + "claimants": [ + { + "destination": "GBEUDKANIFPTFHPWJ5T3R6RIO36RQBFGHYPAQ6STH7KMNDHAT36LHOLD", + "predicate": { + "unconditional": true + } + } + ], + "flags": { + "clawback_enabled": false + }, + "paging_token": "32747318-00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalances.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalances.md new file mode 100644 index 00000000..fd477e16 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getclaimablebalances.md @@ -0,0 +1,133 @@ +--- +title: "getClaimableBalances" +slug: "rpc-stellar-getclaimablebalances" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const params = { + sponsor: "YOUR_SPONSOR_ACCOUNT_ID", + asset: "YOUR_ASSET", + claimant: "YOUR_CLAIMANT_ACCOUNT_ID", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// Retrieve a list of all claimable balances +const claimableBalances = await tatum.rpc.getClaimableBalances(params); + +// Log the list of claimable balances +console.log("Claimable Balances:", claimableBalances); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getClaimableBalances` method allows you to retrieve a list of all available claimable balances on the Stellar blockchain. You can use various filtering options to narrow down the list based on the sponsor account, asset code, claimant account, cursor for pagination, sorting order, and limit for the number of records to be returned. + +### Request Parameters + +The `getClaimableBalances` method accepts the following request parameters: + +- `sponsor` (string, optional): + The account ID of the sponsor to filter claimable balances. Use this parameter to list claimable balances sponsored by a specific account. + +- `asset` (string, optional): + The asset code to filter claimable balances. Use this parameter to list claimable balances associated with a specific asset. + +- `claimant` (string, optional): + The account ID of the claimant to filter claimable balances. Use this parameter to list claimable balances claimable by a specific account. + +- `cursor` (string, optional): + A cursor value that determines the starting point for pagination. Use this parameter to retrieve claimable balances from a specific point in the list. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of claimable balances to fetch in a single request. + +### Return Object + +The `getClaimableBalances` method returns a JSON object containing the list of claimable balances that match the specified criteria. Each claimable balance is represented as an object with various properties describing its characteristics. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=33494305-000000006f6cd6031f3e4fcdfb795412cc0f1ffd45663098691f5eff88ff9b6cff1006a0&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances?cursor=32747318-00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9" + }, + "transactions": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/transactions{?cursor,limit,order}", + "templated": true + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/claimable_balances/00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9/operations{?cursor,limit,order}", + "templated": true + } + }, + "id": "00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9", + "asset": "BODHI:GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF", + "amount": "0.1000000", + "sponsor": "GDCJIHD3623OCYNH65UUQC3NLG2D6YCNCDPZULRLCLOA76TBQRL6A3TF", + "last_modified_ledger": 32747318, + "last_modified_time": null, + "claimants": [ + { + "destination": "GBEUDKANIFPTFHPWJ5T3R6RIO36RQBFGHYPAQ6STH7KMNDHAT36LHOLD", + "predicate": { + "unconditional": true + } + } + ], + "flags": { + "clawback_enabled": false + }, + "paging_token": "32747318-00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-geteffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-geteffects.md new file mode 100644 index 00000000..e67ba05a --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-geteffects.md @@ -0,0 +1,116 @@ +--- +title: "getEffects" +slug: "rpc-stellar-geteffects" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// List all effects +const effects = await tatum.rpc.getEffects(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getEffects` method allows you to list all effects in the Stellar blockchain. Effects represent events or actions that have occurred on the network, such as payments, offers, and trustline changes. + +### Example use cases: + +1. **Effect Monitoring:** + Developers and applications can use this method to monitor and retrieve information about all effects on the Stellar network. + +2. **Streaming Effects:** + Users can use streaming mode to listen for real-time updates to effects as they are added to the Stellar ledger. + +### Request Parameters + +The `getEffects` method accepts a `params` object with the following properties: + +- `cursor` (string, optional): + An optional cursor to start listing effects from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of effects to return. The limit can range from 1 to 200. + +### Return Object + +The `getEffects` method returns an array of effects from the Stellar blockchain. Each effect object contains information about the effect type, details, and related transaction. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?cursor=215271955673288705-1&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?cursor=215271955673169921-1&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "operation": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673169921" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673169921-1" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673169921-1" + } + }, + "id": "0215271955673169921-0000000001", + "paging_token": "215271955673169921-1", + "account": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", + "type": "account_credited", + "type_i": 2, + "created_at": "2024-01-28T14:07:11Z", + "asset_type": "credit_alphanum4", + "asset_code": "yXLM", + "asset_issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55", + "amount": "1.0291984" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getfeestats.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getfeestats.md new file mode 100644 index 00000000..3bcf784b --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getfeestats.md @@ -0,0 +1,88 @@ +--- +title: "getFeeStats" +slug: "rpc-stellar-getfeestats" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Retrieve fee statistics +const feeStats = await tatum.rpc.getFeeStats(); + +// Log the fee statistics +console.log("Fee Statistics:", feeStats); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getFeeStats` method allows you to retrieve information about per-operation fee statistics over the last 5 ledgers on the Stellar blockchain. + +### Return Object + +The `getFeeStats` method returns a JSON object containing fee statistics for various operations. The structure of the returned object is defined by the `FeeStats` schema. + +(Note: The exact fields in the return object may vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "last_ledger": "50744146", + "last_ledger_base_fee": "100", + "ledger_capacity_usage": "0.58", + "fee_charged": { + "max": "100", + "min": "100", + "mode": "100", + "p10": "100", + "p20": "100", + "p30": "100", + "p40": "100", + "p50": "100", + "p60": "100", + "p70": "100", + "p80": "100", + "p90": "100", + "p95": "100", + "p99": "100" + }, + "max_fee": { + "max": "369592103", + "min": "100", + "mode": "100", + "p10": "100", + "p20": "100", + "p30": "100", + "p40": "1000", + "p50": "20000", + "p60": "51234", + "p70": "51234", + "p80": "100159", + "p90": "250005", + "p95": "500000", + "p99": "358388826" + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledger.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledger.md new file mode 100644 index 00000000..660d9e8f --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledger.md @@ -0,0 +1,101 @@ +--- +title: "getLedger" +slug: "rpc-stellar-getledger" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define the sequence number of the ledger to retrieve (Replace placeholders with actual values and remove redundant) +const sequenceNumber = "YOUR_SEQUENCE_NUMBER"; + +// Retrieve information about a specific ledger using its sequence number +const ledgerInfo = await tatum.rpc.getLedger(sequenceNumber); + +// Log the ledger information +console.log("Ledger Info:", ledgerInfo); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLedger` method allows you to retrieve information about a specific ledger on the Stellar blockchain. You can specify the ledger you want to retrieve by providing its sequence number as a parameter. + +### Request Parameters + +The `getLedger` method requires the following request parameter: + +- `sequence` (string, required): + The sequence number of the ledger you want to retrieve. This uniquely identifies the ledger you're interested in. + +### Return Object + +The `getLedger` method returns a JSON object containing information about the specified ledger. The returned object includes various properties describing the ledger's characteristics, such as its sequence number, transaction count, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908" + }, + "transactions": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions{?cursor,limit,order}", + "templated": true + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations{?cursor,limit,order}", + "templated": true + }, + "payments": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects{?cursor,limit,order}", + "templated": true + } + }, + "id": "377342fc7d2d3e8e8aebcc2bd069cebce97ef59142afcf3834187e27670b69e5", + "paging_token": "214305588031520768", + "hash": "377342fc7d2d3e8e8aebcc2bd069cebce97ef59142afcf3834187e27670b69e5", + "prev_hash": "64b283aa8f123102b27334c9b0b4d0ba7baca635bc0fdee2471762755185fc8d", + "sequence": 49896908, + "successful_transaction_count": 122, + "failed_transaction_count": 16, + "operation_count": 422, + "tx_set_operation_count": 444, + "closed_at": "2024-01-13T08:44:04Z", + "total_coins": "105443902087.3472865", + "fee_pool": "4352705.3880757", + "base_fee_in_stroops": 100, + "base_reserve_in_stroops": 5000000, + "max_tx_set_size": 1000, + "protocol_version": 19, + "header_xdr": "AAAAE2Syg6qPEjECsnM0ybC00Lp7rKY1vA/e4kcXYnVRhfyNp1FbP/TkMcsgPzxpkwmSanCPlHIkEEdIUluDz3RuOMAAAAAAZaJNVAAAAAAAAAABAAAAAJnoMfsa4vmDNtUy8T76WXcr2up7H7MouQjkXcMmro3YAAAAQOWiXUUgvk9prIYO2MowcNsSmp7gJ2pDeKstCpOS1JDvEGry7E0EIA2uNNuQicQkF0LPkzibuNqFIrRAlS3qwQt2V4R3dnRsy/hBIt5wz7oIBqVZNDN+w21lovTVBGxHHh5McTecKdm6+JSPeLr+qWjW8QFh7Z8+TOcgCjAtJkI1AvldzA6iHrPseVthAAAnlm6VrbUAAAEWAAAAAFZtQfcAAABkAExLQAAAA+jlo5p0S2VRLG/2qoS2AHIAqWpkozbDmPnGixgTrfRM4EhakDMvJGA2NlrXaNdrDghS8gBVmir/lvjB5aIM8CqaNZ3+bNIMjENN35Wl0SqvmRPHm1ba+rIkuDOUxRhPT5cTHtTJQ8xzm+/8UT+eTL84VX2S5mxKeyMkTW+VYnrVPwAAAAA=" +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgereffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgereffects.md new file mode 100644 index 00000000..c81d135b --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgereffects.md @@ -0,0 +1,112 @@ +--- +title: "getLedgerEffects" +slug: "rpc-stellar-getledgereffects" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define the ledger sequence number and optional parameters (Replace placeholders with actual values and remove redundant) +const params = { + sequence: "YOUR_LEDGER_SEQUENCE", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// Retrieve effects related to a specific ledger +const ledgerEffects = await tatum.rpc.getLedgersEffects(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLedgersEffects` method allows you to retrieve the effects of a specific Stellar ledger. + +### Example use cases: + +1. **Transaction Analysis:** Developers and applications can use this method to analyze the effects related to transactions and operations within a specific ledger. +2. **Transaction Tracking:** Tracking and monitoring the effects of operations within a specific ledger for auditing or analysis purposes. +3. **Historical Data Retrieval:** Researchers and analysts can retrieve effect-related data for historical analysis and record-keeping. + +### Request Parameters + +The `getLedgersEffects` method requires the following parameters: + +- `sequence` (string, required): The sequence number of the ledger for which you want to retrieve effects. +- `cursor` (string, optional): An optional cursor to start listing effects from a specific point within the ledger. +- `order` (string, optional): An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. +- `limit` (number, optional): An optional parameter to specify the maximum number of effects to return. The limit can range from 1 to 200. + +### Return Object + +The `getLedgersEffects` method returns an array of effects related to the specified ledger. Each effect includes details such as the type, account, operation, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects?cursor=214305588031623169-6&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects?cursor=214305588031610881-1&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "operation": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031610881" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031610881-1" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031610881-1" + } + }, + "id": "0214305588031610881-0000000001", + "paging_token": "214305588031610881-1", + "account": "GC2ATEL4K2O5BJO7Z76MYSV6TKHCROKV5GXEOU7NO2TUEOOMFDDIPWID", + "type": "trustline_flags_updated", + "type_i": 26, + "created_at": "2024-01-13T08:44:04Z", + "asset_type": "credit_alphanum4", + "asset_code": "USD", + "asset_issuer": "GC2ATEL4K2O5BJO7Z76MYSV6TKHCROKV5GXEOU7NO2TUEOOMFDDIPWID", + "trustor": "GDFQ5USFBAUR2XEKCC7Z6VBEN5TJJH7TZPFKNHR47RCW36NCO3RQ5U5T", + "authorized_flag": true + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgeroperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgeroperations.md new file mode 100644 index 00000000..3f1a8633 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgeroperations.md @@ -0,0 +1,146 @@ +--- +title: "getLedgerOperations" +slug: "rpc-stellar-getledgeroperations" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define the ledger sequence number and optional parameters (Replace placeholders with actual values and remove redundant) +const params = { + sequence: "YOUR_LEDGER_SEQUENCE", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, + includeFailed: true, + join: "inner", +}; + +// Retrieve successful operations related to a specific ledger +const ledgerOperations = await tatum.rpc.getLedgersOperations(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLedgersOperations` method allows you to retrieve successful operations in a specific Stellar ledger. + +### Example use cases: + +1. **Transaction Analysis:** + Developers and applications can use this method to analyze successful operations within a specific ledger, including operations like payments, account creation, and more. + +2. **Transaction Tracking:** + Tracking and monitoring successful operations made within a specific ledger for auditing or analysis purposes. + +3. **Historical Data Retrieval:** + Researchers and analysts can retrieve operation-related data for historical analysis and record-keeping. + +### Request Parameters + +The `getLedgersOperations` method requires the following parameters: + +- `sequence` (string, required): + The sequence number of the ledger for which you want to retrieve successful operations. + +- `cursor` (string, optional): + An optional cursor to start listing operations from a specific point within the ledger. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of operations to return. The limit can range from 1 to 200. + +- `includeFailed` (boolean, optional): + An optional parameter to include failed operations in the results (true or false). If not provided, it defaults to 'false'. + +- `join` (string, optional): + An optional parameter to specify the join type (inner or left). If not provided, it defaults to 'inner'. + +### Return Object + +The `getLedgersOperations` method returns an array of successful operations within the specified ledger. Each operation includes details such as the source account, operation type, asset, amount, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations?cursor=214305588031541254&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations?cursor=214305588031524865&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031524865" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031524865/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031524865" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031524865" + } + }, + "id": "214305588031524865", + "paging_token": "214305588031524865", + "transaction_successful": true, + "source_account": "GAZCCHIATB5Z6ATORF46EDXRUKVDNGHOFL3NKG7Y577NBTSOWMJX2DOS", + "type": "manage_buy_offer", + "type_i": 12, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4", + "amount": "105606.5780934", + "price": "0.0094863", + "price_r": { + "n": 94863, + "d": 10000000 + }, + "buying_asset_type": "credit_alphanum4", + "buying_asset_code": "SSLX", + "buying_asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", + "selling_asset_type": "native", + "offer_id": "1449752262" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgerpayments.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgerpayments.md new file mode 100644 index 00000000..a40cb4f6 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgerpayments.md @@ -0,0 +1,471 @@ +--- +title: "getLedgerPayments" +slug: "rpc-stellar-getledgerpayments" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define the ledger sequence number and optional parameters (Replace placeholders with actual values and remove redundant) +const params = { + sequence: 'YOUR_LEDGER_SEQUENCE', + cursor: 'YOUR_CURSOR', + order: 'asc', + limit: 10, + includeFailed: true + join: 'inner', +}; + +// Retrieve payments related to a specific ledger +const ledgerPayments = await tatum.rpc.getLedgersPayments(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLedgersPayments` method allows you to retrieve all payment-related operations in a specific Stellar ledger. This includes operations such as `create_account`, `payment`, `path_payment`, and `account_merge`. + +### Example use cases: + +1. **Payment Analysis:** Developers and applications can use this method to analyze payment-related operations within a specific ledger. +2. **Transaction Tracking:** Tracking and monitoring payments made within a specific ledger for auditing or analysis purposes. +3. **Historical Data Retrieval:** Researchers and analysts can retrieve payment-related data for historical analysis and record-keeping. + +### Request Parameters + +The `getLedgersPayments` method requires the following parameters: + +- `sequence` (string, required): The sequence number of the ledger for which you want to retrieve payment-related operations. +- `cursor` (string, optional): An optional cursor to start listing payments from a specific point within the ledger. +- `order` (string, optional): An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. +- `limit` (number, optional): An optional parameter to specify the maximum number of payments to return. The limit can range from 1 to 200. +- `includeFailed` (boolean, optional): An optional parameter to include failed payments in the results (true or false). If not provided, it defaults to 'false'. +- `join` (string, optional): An optional parameter to specify the join type (inner or left). If not provided, it defaults to 'inner'. + +### Return Object + +The `getLedgersPayments` method returns an array of payment-related operations within the specified ledger. Each operation includes details such as the sender, receiver, asset, amount, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments?cursor=214305588031754246&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments?cursor=214305588031623169&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031623169" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/97181f9964085703256e88c1e093fb28b329b7d0dfcf727221b2e957c33301ba" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031623169/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031623169" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031623169" + } + }, + "id": "214305588031623169", + "paging_token": "214305588031623169", + "transaction_successful": true, + "source_account": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", + "type": "path_payment_strict_receive", + "type_i": 2, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "97181f9964085703256e88c1e093fb28b329b7d0dfcf727221b2e957c33301ba", + "asset_type": "native", + "from": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", + "to": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", + "amount": "0.0961919", + "path": [ + { + "asset_type": "credit_alphanum4", + "asset_code": "MOBI", + "asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH" + }, + { + "asset_type": "credit_alphanum12", + "asset_code": "DOGET", + "asset_issuer": "GDOEVDDBU6OBWKL7VHDAOKD77UP4DKHQYKOKJJT5PR3WRDBTX35HUEUX" + }, + { + "asset_type": "credit_alphanum4", + "asset_code": "HODL", + "asset_issuer": "GAQEDFS2JK6JSQO53DWT23TGOLH5ZUZG4O3MNLF3CFUZWEJ6M7MMGJAV" + } + ], + "source_amount": "0.0959902", + "source_max": "0.0961919", + "source_asset_type": "native" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031696897" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/3047186e18a70351c5ec795a33fb97f4c466773df72d0540f0b5bc0332402153" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031696897/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031696897" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031696897" + } + }, + "id": "214305588031696897", + "paging_token": "214305588031696897", + "transaction_successful": true, + "source_account": "GAT7RNROHRNZG7RVOU4G6ODYP7C7QSV7N64BBFVB5U3J2RCZOGAUPBKO", + "type": "path_payment_strict_receive", + "type_i": 2, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "3047186e18a70351c5ec795a33fb97f4c466773df72d0540f0b5bc0332402153", + "asset_type": "credit_alphanum4", + "asset_code": "MOBI", + "asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH", + "from": "GAT7RNROHRNZG7RVOU4G6ODYP7C7QSV7N64BBFVB5U3J2RCZOGAUPBKO", + "to": "GAT7RNROHRNZG7RVOU4G6ODYP7C7QSV7N64BBFVB5U3J2RCZOGAUPBKO", + "amount": "4.6175312", + "path": [ + { + "asset_type": "credit_alphanum4", + "asset_code": "USDC", + "asset_issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN" + }, + { + "asset_type": "native" + } + ], + "source_amount": "4.6142496", + "source_max": "4.6175304", + "source_asset_type": "credit_alphanum4", + "source_asset_code": "MOBI", + "source_asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031709185" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/53dad14d0f7cd496edf2b5f6fb66e6aa423f8b79637f8f2558c954cc0a03f942" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031709185/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031709185" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031709185" + } + }, + "id": "214305588031709185", + "paging_token": "214305588031709185", + "transaction_successful": true, + "source_account": "GBDFUEX5ULIO54S5IYRNNORXI265GVYXXXEYUAEHCVQF2XWA7WJONRJT", + "type": "payment", + "type_i": 1, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "53dad14d0f7cd496edf2b5f6fb66e6aa423f8b79637f8f2558c954cc0a03f942", + "asset_type": "native", + "from": "GBDFUEX5ULIO54S5IYRNNORXI265GVYXXXEYUAEHCVQF2XWA7WJONRJT", + "to": "GC5SCPJLHX6WFLUG2GF2W57R4LQ4QUEJEXFOXSZTBSGNUD6RJW2ZX4D3", + "amount": "50.0000000" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031721473" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/1097e158b818ee82dc358ee88f7428b81590546aefd78904ee57bf49cdcbbe41" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031721473/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031721473" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031721473" + } + }, + "id": "214305588031721473", + "paging_token": "214305588031721473", + "transaction_successful": true, + "source_account": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", + "type": "path_payment_strict_receive", + "type_i": 2, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "1097e158b818ee82dc358ee88f7428b81590546aefd78904ee57bf49cdcbbe41", + "asset_type": "native", + "from": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", + "to": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", + "amount": "0.0509312", + "path": [ + { + "asset_type": "credit_alphanum4", + "asset_code": "MOBI", + "asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH" + }, + { + "asset_type": "credit_alphanum12", + "asset_code": "LIBRE", + "asset_issuer": "GAYCCWKECNGDRHYU3UTREBD2XLC3CUQN6FV22TKM4WCQER3IWR7TF5CY" + }, + { + "asset_type": "credit_alphanum4", + "asset_code": "NLT", + "asset_issuer": "GAX25ZVO4JVPEDK3R7EUFCGVI5XCOQGMVGQNZVFLGY2RWTBIQBW2ZNLT" + } + ], + "source_amount": "0.0506995", + "source_max": "0.0509312", + "source_asset_type": "native" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754241" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754241/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754241" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754241" + } + }, + "id": "214305588031754241", + "paging_token": "214305588031754241", + "transaction_successful": true, + "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "type": "payment", + "type_i": 1, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", + "asset_type": "credit_alphanum4", + "asset_code": "SSLX", + "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", + "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "to": "GCP4FHBWMDMV73LUOENECG6HYR3SXZ4KUB2S4FIGCAWZL7ZQDA27PSYC", + "amount": "0.0100000" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754242" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754242/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754242" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754242" + } + }, + "id": "214305588031754242", + "paging_token": "214305588031754242", + "transaction_successful": true, + "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "type": "payment", + "type_i": 1, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", + "asset_type": "credit_alphanum4", + "asset_code": "SSLX", + "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", + "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "to": "GCP4DTPJ346VZDN3WMKZVGVTW73Q5J4SOCYHE23SBI3XSYMMPWZLGCTP", + "amount": "0.0100000" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754243" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754243/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754243" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754243" + } + }, + "id": "214305588031754243", + "paging_token": "214305588031754243", + "transaction_successful": true, + "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "type": "payment", + "type_i": 1, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", + "asset_type": "credit_alphanum4", + "asset_code": "SSLX", + "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", + "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "to": "GCP4BVXCBHJJNZ3F6N7CSGZ6TMXAKKGENFSGLWFP7BRSCS77X3XI6RTN", + "amount": "0.0100000" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754244" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754244/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754244" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754244" + } + }, + "id": "214305588031754244", + "paging_token": "214305588031754244", + "transaction_successful": true, + "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "type": "payment", + "type_i": 1, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", + "asset_type": "credit_alphanum4", + "asset_code": "SSLX", + "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", + "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "to": "GCP4AQ2H5R2ZPL6VZMD5UTXIBALY47SE2TWE4LOIUPZEDYTSHCQXWQB6", + "amount": "0.0100000" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754245" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754245/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754245" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754245" + } + }, + "id": "214305588031754245", + "paging_token": "214305588031754245", + "transaction_successful": true, + "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "type": "payment", + "type_i": 1, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", + "asset_type": "credit_alphanum4", + "asset_code": "SSLX", + "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", + "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "to": "GCP3WXBZOCDFUXLRHY27EYAFQXLJ4NNWV7HBHBL56IPFKOJQGPBOTNSN", + "amount": "0.0100000" + }, + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754246" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031754246/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214305588031754246" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214305588031754246" + } + }, + "id": "214305588031754246", + "paging_token": "214305588031754246", + "transaction_successful": true, + "source_account": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "type": "payment", + "type_i": 1, + "created_at": "2024-01-13T08:44:04Z", + "transaction_hash": "e03ea73b0e5d575f492fdcab271cc2217172d078f6e842f47df37cf2df2fc571", + "asset_type": "credit_alphanum4", + "asset_code": "SSLX", + "asset_issuer": "GBHFGY3ZNEJWLNO4LBUKLYOCEK4V7ENEBJGPRHHX7JU47GWHBREH37UR", + "from": "GDYW6MND6EB32PNRZAMQNOTFLJOZEAFDG3DUWID7I7NRILFWJS66NOWB", + "to": "GCP3URZ5H3L77QOJ2G44OCOFTVKXXR34CUUWG3IDDKPX3GRPRCMDSJAW", + "amount": "0.0100000" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgers.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgers.md new file mode 100644 index 00000000..eea7e49d --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgers.md @@ -0,0 +1,128 @@ +--- +title: "getLedgers" +slug: "rpc-stellar-getledgers" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define optional parameters for listing ledgers (Replace placeholders with actual values and remove redundant) +const params = { + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// List all ledgers or stream new ledgers as they close +const ledgers = await tatum.rpc.getLedgers(params); + +// Log the list of ledgers +console.log("Ledgers:", ledgers); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLedgers` method allows you to retrieve a list of all ledgers on the Stellar blockchain. You can use this endpoint to either list all existing ledgers or stream new ledgers as they are created. + +### Request Parameters + +The `getLedgers` method supports the following optional request parameters: + +- `cursor` (string, optional): + Set the cursor to start listing ledgers from a specific ledger. If not specified, it starts from the earliest known ledger. + +- `order` (string, optional): + Set the order of listing, which can be either 'asc' (ascending) or 'desc' (descending). If not specified, it defaults to 'asc'. + +- `limit` (integer, optional): + Set the maximum number of ledgers to return in a single request. The limit can range from 1 to an upper limit hardcoded in Horizon for performance reasons. If not specified, it defaults to 10. + +### Return Object + +The `getLedgers` method returns a JSON object representing a list of ledgers on the Stellar blockchain. Each ledger entry includes various properties describing the ledger's characteristics, such as its sequence number, transaction count, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers?cursor=209252254065098752&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers?cursor=214305626686226432&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers?cursor=214305588031520768&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908" + }, + "transactions": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions{?cursor,limit,order}", + "templated": true + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/operations{?cursor,limit,order}", + "templated": true + }, + "payments": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/payments{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/effects{?cursor,limit,order}", + "templated": true + } + }, + "id": "377342fc7d2d3e8e8aebcc2bd069cebce97ef59142afcf3834187e27670b69e5", + "paging_token": "214305588031520768", + "hash": "377342fc7d2d3e8e8aebcc2bd069cebce97ef59142afcf3834187e27670b69e5", + "prev_hash": "64b283aa8f123102b27334c9b0b4d0ba7baca635bc0fdee2471762755185fc8d", + "sequence": 49896908, + "successful_transaction_count": 122, + "failed_transaction_count": 16, + "operation_count": 422, + "tx_set_operation_count": 444, + "closed_at": "2024-01-13T08:44:04Z", + "total_coins": "105443902087.3472865", + "fee_pool": "4352705.3880757", + "base_fee_in_stroops": 100, + "base_reserve_in_stroops": 5000000, + "max_tx_set_size": 1000, + "protocol_version": 19, + "header_xdr": "AAAAE2Syg6qPEjECsnM0ybC00Lp7rKY1vA/e4kcXYnVRhfyNp1FbP/TkMcsgPzxpkwmSanCPlHIkEEdIUluDz3RuOMAAAAAAZaJNVAAAAAAAAAABAAAAAJnoMfsa4vmDNtUy8T76WXcr2up7H7MouQjkXcMmro3YAAAAQOWiXUUgvk9prIYO2MowcNsSmp7gJ2pDeKstCpOS1JDvEGry7E0EIA2uNNuQicQkF0LPkzibuNqFIrRAlS3qwQt2V4R3dnRsy/hBIt5wz7oIBqVZNDN+w21lovTVBGxHHh5McTecKdm6+JSPeLr+qWjW8QFh7Z8+TOcgCjAtJkI1AvldzA6iHrPseVthAAAnlm6VrbUAAAEWAAAAAFZtQfcAAABkAExLQAAAA+jlo5p0S2VRLG/2qoS2AHIAqWpkozbDmPnGixgTrfRM4EhakDMvJGA2NlrXaNdrDghS8gBVmir/lvjB5aIM8CqaNZ3+bNIMjENN35Wl0SqvmRPHm1ba+rIkuDOUxRhPT5cTHtTJQ8xzm+/8UT+eTL84VX2S5mxKeyMkTW+VYnrVPwAAAAA=" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgertransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgertransactions.md new file mode 100644 index 00000000..e6427592 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getledgertransactions.md @@ -0,0 +1,145 @@ +--- +title: "getLedgerTransactions" +slug: "rpc-stellar-getledgertransactions" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define the ledger sequence number and optional parameters (Replace placeholders with actual values and remove redundant) +const params = { + sequence: "YOUR_LEDGER_SEQUENCE", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, + includeFailed: true, +}; + +// Retrieve transactions for a specific ledger +const ledgerTransactions = await tatum.rpc.getLedgersTransactions(params); + +// Log the list of ledger transactions +console.log("Ledger Transactions:", ledgerTransactions); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLedgersTransactions` method allows you to retrieve a list of successful transactions associated with a specific ledger on the Stellar blockchain. You can specify the ledger's sequence number and use optional parameters to customize the result. + +### Request Parameters + +The `getLedgersTransactions` method requires the following parameters: + +- `sequence` (string, required): Specify the sequence number of the ledger for which you want to retrieve transactions. +- `cursor` (string, optional): Set the cursor to start listing transactions from a specific transaction within the ledger. If not specified, it starts from the beginning. +- `order` (string, optional): Set the order of listing, which can be either 'asc' (ascending) or 'desc' (descending). If not specified, it defaults to 'asc'. +- `limit` (integer, optional): Set the maximum number of transactions to return in a single request. The limit can range from 1 to an upper limit hardcoded in Horizon for performance reasons. If not specified, it defaults to 10. +- `includeFailed` (boolean, optional): Specify whether to include failed transactions in the results. Set to `true` to include failed transactions, or `false` to exclude them. If not specified, it defaults to `false`. + +### Return Object + +The `getLedgersTransactions` method returns a JSON object representing a list of successful transactions associated with the specified ledger. Each transaction entry includes various properties describing the transaction, such as its transaction hash, source account, operation details, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions?cursor=214305588031565824&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908/transactions?cursor=214305588031524864&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4" + }, + "account": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GAZCCHIATB5Z6ATORF46EDXRUKVDNGHOFL3NKG7Y577NBTSOWMJX2DOS" + }, + "ledger": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/49896908" + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4/operations{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4/effects{?cursor,limit,order}", + "templated": true + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=asc&cursor=214305588031524864" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=desc&cursor=214305588031524864" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4" + } + }, + "id": "83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4", + "paging_token": "214305588031524864", + "successful": true, + "hash": "83e580608afbc0d269107dd92629ae5be4a039c2751896bdf8e357a9cd947ea4", + "ledger": 49896908, + "created_at": "2024-01-13T08:44:04Z", + "source_account": "GAZCCHIATB5Z6ATORF46EDXRUKVDNGHOFL3NKG7Y577NBTSOWMJX2DOS", + "source_account_sequence": "157780425393618577", + "fee_account": "GAZCCHIATB5Z6ATORF46EDXRUKVDNGHOFL3NKG7Y577NBTSOWMJX2DOS", + "fee_charged": "100", + "max_fee": "100", + "operation_count": 1, + "envelope_xdr": "AAAAAgAAAAAyIR0AmHufAm6JeeIO8aKqNpjuKvbVG/jv/tDOTrMTfQAAAGQCMIx2ABi+kQAAAAEAAAAAAAAAAAAAAABlok1uAAAAAAAAAAEAAAAAAAAADAAAAAAAAAABU1NMWAAAAABOU2N5aRNltdxYaKXhwiK5X5GkCkz4nPf6ac+axwxIfQAAAPXibPzGAAFyjwCYloAAAAAAVml2xgAAAAAAAAABTrMTfQAAAEDf1H9htFjhgBsmeu+wg7k0wWJzTsX0bPmUuulWF2cW6A83T0Dc/iea50iARBqCjlF0u7ANpEmOWdhK2CW3/UAF", + "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAMAAAAAAAAAAAAAAABAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAAFZpdsYAAAAAAAAAAVNTTFgAAAAATlNjeWkTZbXcWGil4cIiuV+RpApM+Jz3+mnPmscMSH0AAAACVSDxEQCYloAAAXKPAAAAAAAAAAAAAAAA", + "result_meta_xdr": "AAAAAgAAAAIAAAADAvldzAAAAAAAAAAAMiEdAJh7nwJuiXniDvGiqjaY7ir21Rv47/7Qzk6zE30AAAAW0Mp5WAIwjHYAGL6QAAAAJgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAQAAACJBvvGgAAAAFba2mA4AAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAC+V3LAAAAAGWiTU4AAAAAAAAAAQL5XcwAAAAAAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAFtDKeVgCMIx2ABi+kQAAACYAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAEAAAAiQb7xoAAAABW2tpgOAAAAAgAAAAAAAAAAAAAAAAAAAAMAAAAAAvldzAAAAABlok1UAAAAAAAAAAEAAAAGAAAAAwL5XOYAAAACAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAAFZpdsYAAAAAAAAAAVNTTFgAAAAATlNjeWkTZbXcWGil4cIiuV+RpApM+Jz3+mnPmscMSH0AAAACVSF7XwCYloAAAXKPAAAAAAAAAAAAAAAAAAAAAQL5XcwAAAACAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAAFZpdsYAAAAAAAAAAVNTTFgAAAAATlNjeWkTZbXcWGil4cIiuV+RpApM+Jz3+mnPmscMSH0AAAACVSDxEQCYloAAAXKPAAAAAAAAAAAAAAAAAAAAAwL5XcsAAAABAAAAADIhHQCYe58Cbol54g7xoqo2mO4q9tUb+O/+0M5OsxN9AAAAAVNTTFgAAAAATlNjeWkTZbXcWGil4cIiuV+RpApM+Jz3+mnPmscMSH0AAAEkapBph3zmbFDihAAAAAAAAQAAAAEAAAOQdGO06wAAAPIDPIERAAAAAAAAAAAAAAABAvldzAAAAAEAAAAAMiEdAJh7nwJuiXniDvGiqjaY7ir21Rv47/7Qzk6zE30AAAABU1NMWAAAAABOU2N5aRNltdxYaKXhwiK5X5GkCkz4nPf6ac+axwxIfQAAASRqkGmHfOZsUOKEAAAAAAABAAAAAQAAA5B0KsGBAAAA8gM8gREAAAAAAAAAAAAAAAMC+V3MAAAAAAAAAAAyIR0AmHufAm6JeeIO8aKqNpjuKvbVG/jv/tDOTrMTfQAAABbQynlYAjCMdgAYvpEAAAAmAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAIkG+8aAAAAAVtraYDgAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAL5XcwAAAAAZaJNVAAAAAAAAAABAvldzAAAAAAAAAAAMiEdAJh7nwJuiXniDvGiqjaY7ir21Rv47/7Qzk6zE30AAAAW0Mp5WAIwjHYAGL6RAAAAJgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAQAAACJBvvGgAAAAFba2DcAAAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAC+V3MAAAAAGWiTVQAAAAAAAAAAA==", + "fee_meta_xdr": "AAAAAgAAAAMC+V3LAAAAAAAAAAAyIR0AmHufAm6JeeIO8aKqNpjuKvbVG/jv/tDOTrMTfQAAABbQynm8AjCMdgAYvpAAAAAmAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAABAAAAIkG+8aAAAAAVtraYDgAAAAIAAAAAAAAAAAAAAAAAAAADAAAAAAL5XcsAAAAAZaJNTgAAAAAAAAABAvldzAAAAAAAAAAAMiEdAJh7nwJuiXniDvGiqjaY7ir21Rv47/7Qzk6zE30AAAAW0Mp5WAIwjHYAGL6QAAAAJgAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAQAAACJBvvGgAAAAFba2mA4AAAACAAAAAAAAAAAAAAAAAAAAAwAAAAAC+V3LAAAAAGWiTU4AAAAA", + "memo_type": "none", + "signatures": [ + "39R/YbRY4YAbJnrvsIO5NMFic07F9Gz5lLrpVhdnFugPN09A3P4nmudIgEQago5RdLuwDaRJjlnYStglt/1ABQ==" + ], + "valid_after": "1970-01-01T00:00:00Z", + "valid_before": "2024-01-13T08:44:30Z", + "preconditions": { + "timebounds": { + "min_time": "0", + "max_time": "1705135470" + } + } + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypool.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypool.md new file mode 100644 index 00000000..5698db5e --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypool.md @@ -0,0 +1,102 @@ +--- +title: "getLiquidityPool" +slug: "rpc-stellar-getliquiditypool" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 12:59:42 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Replace 'YOUR_LIQUIDITY_POOL_ID' with the actual Liquidity Pool ID +const liquidityPoolId = "YOUR_LIQUIDITY_POOL_ID"; + +// Retrieve information about a specific liquidity pool +const liquidityPool = await tatum.rpc.getLiquidityPool(liquidityPoolId); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLiquidityPool` method allows you to retrieve information about a specific liquidity pool on the Stellar blockchain. + +### Example use cases: + +1. **Liquidity Pool Analysis:** + Developers and applications can use this method to analyze and retrieve detailed information about a specific liquidity pool. + +2. **Liquidity Pool Management:** + Platform administrators can access information about a liquidity pool for management purposes. + +3. **Liquidity Pool Exploration:** + Researchers and analysts can explore and study the characteristics of individual liquidity pools. + +### Request Parameters + +The `getLiquidityPool` method requires the following parameter: + +- `liquidityPoolId` (string): + The unique identifier of the liquidity pool you want to retrieve information about. + +### Return Object + +The `getLiquidityPool` method returns an object containing detailed information about the specified liquidity pool. This information may include the liquidity pool ID, reserve assets, total value, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a" + }, + "transactions": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions{?cursor,limit,order}", + "templated": true + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations{?cursor,limit,order}", + "templated": true + } + }, + "id": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", + "paging_token": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", + "fee_bp": 30, + "type": "constant_product", + "total_trustlines": "1", + "total_shares": "5494.2144063", + "reserves": [ + { + "asset": "native", + "amount": "3.5287238" + }, + { + "asset": "GOLDBANK001:GDEUQ2MX3YXMITFOTC3CO3GW5V3XE3IVG7JKLZZAOZ7WFYIN256INDUS", + "amount": "11669718.3952703" + } + ], + "last_modified_ledger": 50744249, + "last_modified_time": "2024-03-11T13:02:15Z" +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooleffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooleffects.md new file mode 100644 index 00000000..54ff0a4b --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooleffects.md @@ -0,0 +1,101 @@ +--- +title: "getLiquidityPoolEffects" +slug: "rpc-stellar-getliquiditypooleffects" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Replace 'YOUR_LIQUIDITY_POOL_ID' with the actual Liquidity Pool ID +const liquidityPoolId = "YOUR_LIQUIDITY_POOL_ID"; + +// Retrieve effects related to a specific liquidity pool +const effects = await tatum.rpc.liquidityPoolEffects(liquidityPoolId); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `liquidityPoolEffects` method allows you to retrieve effects related to a specific liquidity pool on the Stellar blockchain. Effects represent various events or changes that occur within the Stellar network, such as trades, payments, and more. + +### Example use cases: + +1. **Monitoring Liquidity Pool Activity:** + Developers and applications can use this method to monitor and track events related to a particular liquidity pool. + +2. **Transaction Analysis:** + Researchers and analysts can analyze the effects of liquidity pool transactions for reporting and insights. + +3. **Real-time Updates:** + Applications can subscribe to streaming updates to receive real-time notifications of new effects associated with the liquidity pool. + +### Request Parameters + +The `liquidityPoolEffects` method requires the following parameters: + +- `liquidityPoolId` (string): + The unique identifier of the liquidity pool for which you want to retrieve related effects. + + ```json + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/effects?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/effects?cursor=214312580239376385-2&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/effects?cursor=214312571649462273-1&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "operation": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214312571649462273" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=214312571649462273-1" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=214312571649462273-1" + } + }, + "id": "0214312571649462273-0000000001", + "paging_token": "214312571649462273-1", + "account": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", + "type": "account_credited", + "type_i": 2, + "created_at": "2024-01-13T11:19:52Z", + "asset_type": "native", + "amount": "0.0252872" + } + ] + } + } + ``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooloperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooloperations.md new file mode 100644 index 00000000..053f73b4 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooloperations.md @@ -0,0 +1,171 @@ +--- +title: "getLiquidityPoolOperations" +slug: "rpc-stellar-getliquiditypooloperations" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + liquidityPoolId: "YOUR_LIQUIDITY_POOL_ID", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, + includeFailed: true, + join: true, +}; + +// Retrieve operations related to a liquidity pool +const liquidityPoolOperations = await tatum.rpc.getLiquidityPoolOperations( + params +); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLiquidityPoolOperations` method allows you to retrieve a list of operations related to a specific liquidity pool on the Stellar blockchain. + +### Example use cases: + +1. **Liquidity Pool Operation Analysis:** + Developers and applications can use this method to analyze and retrieve information about operations associated with a liquidity pool. + +2. **Liquidity Pool Operation Monitoring:** + Platform administrators can monitor and track operations related to liquidity pools for auditing and management purposes. + +3. **Liquidity Pool Operation Exploration:** + Researchers and analysts can explore and analyze the characteristics of operations involving liquidity pools on the Stellar network. + +### Request Parameters + +The `getLiquidityPoolOperations` method accepts the following optional parameters: + +- `liquidityPoolId` (string, required): + The unique identifier of the liquidity pool for which you want to retrieve operations. + +- `cursor` (string, optional): + An optional cursor to start listing operations from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of operations to return. The limit can range from 1 to 200. + +- `includeFailed` (boolean, optional): + An optional parameter to include failed operations. If set to true, failed operations will be included in the results. Defaults to false. + +- `join` (boolean, optional): + An optional parameter to join results. If set to true, results will be joined. Defaults to false. + +### Return Object + +The `getLiquidityPoolOperations` method returns an array of operations related to the specified liquidity pool on the Stellar blockchain. Each operation object contains information such as the operation ID, source account, type of operation, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations?cursor=215379467295031297&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations?cursor=215280038803128321&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215280038803128321" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215280038803128321/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215280038803128321" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215280038803128321" + } + }, + "id": "215280038803128321", + "paging_token": "215280038803128321", + "transaction_successful": true, + "source_account": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", + "type": "path_payment_strict_receive", + "type_i": 2, + "created_at": "2024-01-28T17:10:34Z", + "transaction_hash": "91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56", + "asset_type": "native", + "from": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", + "to": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", + "amount": "0.0149988", + "path": [ + { + "asset_type": "credit_alphanum12", + "asset_code": "XRPBANK003", + "asset_issuer": "GAUCPLSPBJKOSN7WZK6SDD2BYPQMC3YSWMLX4XXY7S4JPQFLJXEINDUS" + }, + { + "asset_type": "credit_alphanum12", + "asset_code": "XRPGOLD", + "asset_issuer": "GAUCPLSPBJKOSN7WZK6SDD2BYPQMC3YSWMLX4XXY7S4JPQFLJXEINDUS" + }, + { + "asset_type": "credit_alphanum12", + "asset_code": "BRICSGOLD", + "asset_issuer": "GAUCPLSPBJKOSN7WZK6SDD2BYPQMC3YSWMLX4XXY7S4JPQFLJXEINDUS" + }, + { + "asset_type": "credit_alphanum12", + "asset_code": "RUGOLDBRIDGE", + "asset_issuer": "GAUCPLSPBJKOSN7WZK6SDD2BYPQMC3YSWMLX4XXY7S4JPQFLJXEINDUS" + }, + { + "asset_type": "credit_alphanum12", + "asset_code": "GOLDBANK001", + "asset_issuer": "GDEUQ2MX3YXMITFOTC3CO3GW5V3XE3IVG7JKLZZAOZ7WFYIN256INDUS" + } + ], + "source_amount": "0.0145987", + "source_max": "0.0149988", + "source_asset_type": "native" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypools.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypools.md new file mode 100644 index 00000000..7f667b86 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypools.md @@ -0,0 +1,137 @@ +--- +title: "getLiquidityPools" +slug: "rpc-stellar-getliquiditypools" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define optional parameters (Replace placeholders with actual values and remove redundant) +const params = { + reserve: "YOUR_RESERVE", + account: "YOUR_ACCOUNT", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// List all available liquidity pools +const liquidityPools = await tatum.rpc.getLiquidityPools(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLiquidityPools` method allows you to retrieve a list of all available liquidity pools on the Stellar blockchain. + +### Example use cases: + +1. **Liquidity Pool Analysis:** + Developers and applications can use this method to analyze and retrieve information about existing liquidity pools. + +2. **Liquidity Pool Management:** + Platform administrators can manage liquidity pools by listing and tracking their status. + +3. **Liquidity Pool Exploration:** + Researchers and analysts can explore and analyze the characteristics of liquidity pools on the Stellar network. + +### Request Parameters + +The `getLiquidityPools` method accepts the following optional parameters: + +- `reserve` (string, optional): + Filter liquidity pools by the reserve asset. Provide the asset code of the reserve asset. + +- `account` (string, optional): + Filter liquidity pools by account ID. Provide the account ID associated with the liquidity pool. + +- `cursor` (string, optional): + An optional cursor to start listing liquidity pools from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of liquidity pools to return. The limit can range from 1 to 200. + +### Return Object + +The `getLiquidityPools` method returns an array of liquidity pools on the Stellar blockchain. Each liquidity pool object contains information such as the liquidity pool ID, reserve asset, total value, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools?cursor=00293f3a22c8ef5561de7cefc98f9286ac688cb8abf6b1c29a1dabbb63f265ce&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools?cursor=0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a" + }, + "transactions": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions{?cursor,limit,order}", + "templated": true + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/operations{?cursor,limit,order}", + "templated": true + } + }, + "id": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", + "paging_token": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", + "fee_bp": 30, + "type": "constant_product", + "total_trustlines": "1", + "total_shares": "5494.2144063", + "reserves": [ + { + "asset": "native", + "amount": "3.5287238" + }, + { + "asset": "GOLDBANK001:GDEUQ2MX3YXMITFOTC3CO3GW5V3XE3IVG7JKLZZAOZ7WFYIN256INDUS", + "amount": "11669718.3952703" + } + ], + "last_modified_ledger": 50744249, + "last_modified_time": "2024-03-11T13:02:15Z" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltrades.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltrades.md new file mode 100644 index 00000000..b793fd8f --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltrades.md @@ -0,0 +1,132 @@ +--- +title: "getLiquidityPoolTrades" +slug: "rpc-stellar-getliquiditypooltrades" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + liquidityPoolId: "YOUR_LIQUIDITY_POOL_ID", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// Retrieve trades related to a liquidity pool +const liquidityPoolTrades = await tatum.rpc.getLiquidityPoolTrades(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLiquidityPoolTrades` method allows you to retrieve successful trades fulfilled by a specific liquidity pool on the Stellar blockchain. + +### Example use cases: + +1. **Liquidity Pool Monitoring:** + Developers and applications can use this method to monitor and retrieve successful trades related to liquidity pools. + +2. **Liquidity Pool Analysis:** + Researchers and analysts can analyze the trade history of liquidity pools to gain insights into their performance. + +### Request Parameters + +The `getLiquidityPoolTrades` method accepts the following parameters: + +- `liquidityPoolId` (string): + The ID of the liquidity pool for which you want to retrieve related trades. + +- `cursor` (string, optional): + An optional cursor to start listing liquidity pool trades from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of trades to return. The limit can range from 1 to 200. + +### Return Object + +The `getLiquidityPoolTrades` method returns an array of trades related to the specified liquidity pool on the Stellar blockchain. Each trade object contains information such as the trade ID, asset details, timestamp, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/trades?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/trades?cursor=214318047732097026-0&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/trades?cursor=214312571649462273-0&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "" + }, + "base": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742" + }, + "counter": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a" + }, + "operation": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214312571649462273" + } + }, + "id": "214312571649462273-0", + "paging_token": "214312571649462273-0", + "ledger_close_time": "2024-01-13T11:19:52Z", + "trade_type": "liquidity_pool", + "liquidity_pool_fee_bp": 30, + "base_offer_id": "4825998590076850177", + "base_account": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", + "base_amount": "0.0242091", + "base_asset_type": "native", + "counter_liquidity_pool_id": "0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a", + "counter_amount": "23250.7124160", + "counter_asset_type": "credit_alphanum12", + "counter_asset_code": "GOLDBANK001", + "counter_asset_issuer": "GDEUQ2MX3YXMITFOTC3CO3GW5V3XE3IVG7JKLZZAOZ7WFYIN256INDUS", + "base_is_seller": false, + "price": { + "n": "232507124160", + "d": "242091" + } + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltransactions.md new file mode 100644 index 00000000..58117d16 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getliquiditypooltransactions.md @@ -0,0 +1,177 @@ +--- +title: "getLiquidityPoolTransactions" +slug: "rpc-stellar-getliquiditypooltransactions" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + liquidityPoolId: "YOUR_LIQUIDITY_POOL_ID", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, + includeFailed: true, +}; + +// Retrieve transactions related to a liquidity pool +const liquidityPoolTransactions = await tatum.rpc.getLiquidityPoolsTransactions( + params +); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getLiquidityPoolsTransactions` method allows you to retrieve a list of transactions related to a specific liquidity pool on the Stellar blockchain. + +### Example use cases: + +1. **Liquidity Pool Transaction Analysis:** + Developers and applications can use this method to analyze and retrieve information about transactions associated with a liquidity pool. + +2. **Liquidity Pool Transaction Monitoring:** + Platform administrators can monitor and track transactions related to liquidity pools for auditing and management purposes. + +3. **Liquidity Pool Transaction Exploration:** + Researchers and analysts can explore and analyze the characteristics of transactions involving liquidity pools on the Stellar network. + +### Request Parameters + +The `getLiquidityPoolsTransactions` method accepts the following optional parameters: + +- `liquidityPoolId` (string, required): + The unique identifier of the liquidity pool for which you want to retrieve transactions. + +- `cursor` (string, optional): + An optional cursor to start listing transactions from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of transactions to return. The limit can range from 1 to 200. + +- `includeFailed` (boolean, optional): + An optional parameter to include failed transactions. If set to true, failed transactions will be included in the results. Defaults to false. + +### Return Object + +The `getLiquidityPoolsTransactions` method returns an array of transactions related to the specified liquidity pool on the Stellar blockchain. Each transaction object contains information such as the transaction ID, source account, destination account, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions?cursor=215379467295031296&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/liquidity_pools/0000a8198b5e25994c1ca5b0556faeb27325ac746296944144e0a7406d501e8a/transactions?cursor=215280038803128320&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56" + }, + "account": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA4OGQSH75L2BBUEBRI4R56BP7ONJIJPGPSZXZYFCKQGXICPOXWFAU4H" + }, + "ledger": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/ledgers/50123790" + }, + "operations": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56/operations{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56/effects{?cursor,limit,order}", + "templated": true + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=asc&cursor=215280038803128320" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions?order=desc&cursor=215280038803128320" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56" + } + }, + "id": "91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56", + "paging_token": "215280038803128320", + "successful": true, + "hash": "91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56", + "ledger": 50123790, + "created_at": "2024-01-28T17:10:34Z", + "source_account": "GA4OGQSH75L2BBUEBRI4R56BP7ONJIJPGPSZXZYFCKQGXICPOXWFAU4H", + "account_muxed": "MA4OGQSH75L2BBUEBRI4R56BP7ONJIJPGPSZXZYFCKQGXICPOXWFAAAACJ4MHP7NAT4JQ", + "account_muxed_id": "20309889510660", + "source_account_sequence": "169911040828572928", + "fee_account": "GA5Q3UHRKBBZFUQBFF3CEEPY322UIEALGUA7KS7LKGMAK7WJ4NF3W742", + "fee_charged": "200", + "max_fee": "2000", + "operation_count": 1, + "envelope_xdr": "", + "result_xdr": "", + "result_meta_xdr": "", + "memo_type": "none", + "signatures": [ + "qJxrEWQTd6cpHZyTgN4Ms+OwcE2rg+AqDlhUP5a450NlP8R4Vd6mgIxHR7ituxy9GS2W7Rl1XmqpgNCVup0kCw==" + ], + "valid_after": "1970-01-01T00:00:00Z", + "preconditions": { + "timebounds": { + "min_time": "0" + } + }, + "fee_bump_transaction": { + "hash": "91a59ae616f077b905d29841d7b053282862d3fade107163ea9256847588ef56", + "signatures": [ + "qJxrEWQTd6cpHZyTgN4Ms+OwcE2rg+AqDlhUP5a450NlP8R4Vd6mgIxHR7ituxy9GS2W7Rl1XmqpgNCVup0kCw==" + ] + }, + "inner_transaction": { + "hash": "a87a96da677ed8c7e079ac7e920399c864bfc811299d351fc4cf7b5588b1ddbd", + "signatures": [ + "EK3OcLKkmFFHZaM75DkXF2OrSB3hc57kmUvqTA85yVKCu4WWAjQuDXSUJUczBiwKj3XMOTBUrDAJt+tYiB/YAA==", + "Qu/5Py1qmxLO3zo1qB0kFfTithuGiv+mGfiVh1/IkN1PAuHNZPJkLMpzxgYiAYHj9vJnsgqG7IIfU5+23E1kCA==" + ], + "max_fee": "500" + } + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffer.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffer.md new file mode 100644 index 00000000..1dd3c6e6 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffer.md @@ -0,0 +1,97 @@ +--- +title: "getOffer" +slug: "rpc-stellar-getoffer" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const offerId = "OFFER_ID"; + +// Retrieve information on a specific offer +const offerInfo = await tatum.rpc.getOffer(offerId); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getOffer` method allows you to retrieve information on a specific offer by providing the offer's unique identifier. + +### Example use cases: + +1. **Offer Information Retrieval:** + Developers and applications can use this method to retrieve detailed information about a specific offer on the Stellar network. + +2. **Offer Verification:** + Users can verify the details of an offer, including the asset types, issuer, code, and other relevant information. + +### Request Parameters + +The `getOffer` method accepts the following parameter: + +- `offerId` (string, required): + The unique identifier of the offer for which you want to retrieve information. + +### Return Object + +The `getOffer` method returns detailed information about the specified offer on the Stellar blockchain. The response includes data such as the offer ID, sponsor, seller, buying asset, selling asset, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/offers/2" + }, + "offer_maker": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GBPO4N6XOLOLW2EV6X2AEQMLKOBH3WF2IJCZEQU65SVVSN4JD44WORKD" + } + }, + "id": "2", + "paging_token": "2", + "seller": "GBPO4N6XOLOLW2EV6X2AEQMLKOBH3WF2IJCZEQU65SVVSN4JD44WORKD", + "selling": { + "asset_type": "credit_alphanum4", + "asset_code": "CHP", + "asset_issuer": "GDW3CNKSP5AOTDQ2YCKNGC6L65CE4JDX3JS5BV427OB54HCF2J4PUEVG" + }, + "buying": { + "asset_type": "credit_alphanum4", + "asset_code": "BEER", + "asset_issuer": "GDW3CNKSP5AOTDQ2YCKNGC6L65CE4JDX3JS5BV427OB54HCF2J4PUEVG" + }, + "amount": "1.9991292", + "price_r": { + "n": 1903, + "d": 20 + }, + "price": "95.1500000", + "last_modified_ledger": 50044488, + "last_modified_time": null +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffers.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffers.md new file mode 100644 index 00000000..6bfa8236 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffers.md @@ -0,0 +1,159 @@ +--- +title: "getOffers" +slug: "rpc-stellar-getoffers" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + sponsor: "SPONSOR_ADDRESS", + seller: "SELLER_ADDRESS", + sellingAssetType: "ASSET_TYPE", + sellingAssetIssuer: "ASSET_ISSUER", + sellingAssetCode: "ASSET_CODE", + buyingAssetType: "ASSET_TYPE", + buyingAssetIssuer: "ASSET_ISSUER", + buyingAssetCode: "ASSET_CODE", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// List all open offers +const allOffers = await tatum.rpc.getOffers(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getOffers` method allows you to list all currently open offers on the Stellar blockchain. + +### Example use cases: + +1. **Offer Monitoring:** + Developers and applications can use this method to monitor and retrieve information about all open offers on the Stellar network. + +2. **Offer Filtering:** + Platform administrators can filter and search for specific offers based on various criteria, such as asset type, issuer, code, seller, and more. + +3. **Streaming Offers:** + Users can use streaming mode to listen for new offers as they are added to the Stellar ledger. + +### Request Parameters + +The `getOffers` method accepts the following optional parameters: + +- `sponsor` (string, optional): + Filter by the sponsor of the offer. + +- `seller` (string, optional): + Filter by the seller of the offer. + +- `sellingAssetType` (string, optional): + Filter by the selling asset type. + +- `sellingAssetIssuer` (string, optional): + Filter by the selling asset issuer. + +- `sellingAssetCode` (string, optional): + Filter by the selling asset code. + +- `buyingAssetType` (string, optional): + Filter by the buying asset type. + +- `buyingAssetIssuer` (string, optional): + Filter by the buying asset issuer. + +- `buyingAssetCode` (string, optional): + Filter by the buying asset code. + +- `cursor` (string, optional): + An optional cursor to start listing offers from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of offers to return. The limit can range from 1 to 200. + +### Return Object + +The `getOffers` method returns an array of open offers on the Stellar blockchain. Each offer object contains information such as the offer ID, sponsor, seller, buying asset, selling asset, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/offers?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/offers?cursor=1848&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/offers?cursor=2&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/offers/2" + }, + "offer_maker": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GBPO4N6XOLOLW2EV6X2AEQMLKOBH3WF2IJCZEQU65SVVSN4JD44WORKD" + } + }, + "id": "2", + "paging_token": "2", + "seller": "GBPO4N6XOLOLW2EV6X2AEQMLKOBH3WF2IJCZEQU65SVVSN4JD44WORKD", + "selling": { + "asset_type": "credit_alphanum4", + "asset_code": "CHP", + "asset_issuer": "GDW3CNKSP5AOTDQ2YCKNGC6L65CE4JDX3JS5BV427OB54HCF2J4PUEVG" + }, + "buying": { + "asset_type": "credit_alphanum4", + "asset_code": "BEER", + "asset_issuer": "GDW3CNKSP5AOTDQ2YCKNGC6L65CE4JDX3JS5BV427OB54HCF2J4PUEVG" + }, + "amount": "1.9991292", + "price_r": { + "n": 1903, + "d": 20 + }, + "price": "95.1500000", + "last_modified_ledger": 50044488, + "last_modified_time": null + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffertrades.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffertrades.md new file mode 100644 index 00000000..3e3048e5 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoffertrades.md @@ -0,0 +1,137 @@ +--- +title: "getOfferTrades" +slug: "rpc-stellar-getoffertrades" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + offerId = 'OFFER_ID'; + cursor = 'YOUR_CURSOR'; + order = 'asc'; + limit = 10; +} + +// Retrieve trades for a specific offer +const offerTrades = await tatum.rpc.getOfferTrades(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getOfferTrades` method allows you to retrieve all trades associated with a specific offer by providing the offer's unique identifier. + +### Example use cases: + +1. **Trade Analysis:** + Developers and applications can use this method to analyze and retrieve information about trades related to a specific offer on the Stellar network. + +2. **Trade Monitoring:** + Platform administrators can monitor and track trades associated with offers for auditing and management purposes. + +3. **Streaming Trades:** + Users can use streaming mode to listen for new trades related to the offer as they are added to the Stellar ledger. + +### Request Parameters + +The `getOfferTrades` method accepts the following optional parameters: + +- `offerId` (string, required): + The unique identifier of the offer for which you want to retrieve trades. + +- `cursor` (string, optional): + An optional cursor to start listing trades from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of trades to return. The limit can range from 1 to 200. + +### Return Object + +The `getOfferTrades` method returns an array of trades related to the specified offer on the Stellar blockchain. Each trade object contains information such as the trade ID, seller, buyer, price, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_links": { + "self": { + "href": "https://horizon.stellar.org/offers/104078276/trades?cursor=&limit=3&order=asc" + }, + "next": { + "href": "https://horizon.stellar.org/offers/104078276/trades?cursor=107449584845914113-0&limit=3&order=asc" + }, + "prev": { + "href": "https://horizon.stellar.org/offers/104078276/trades?cursor=107449468881756161-0&limit=3&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "" + }, + "base": { + "href": "https://horizon.stellar.org/accounts/GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX" + }, + "counter": { + "href": "https://horizon.stellar.org/accounts/GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K" + }, + "operation": { + "href": "https://horizon.stellar.org/operations/107449468881756161" + } + }, + "id": "107449468881756161-0", + "paging_token": "107449468881756161-0", + "ledger_close_time": "2019-07-26T09:17:02Z", + "offer_id": "104078276", + "base_offer_id": "104078276", + "base_account": "GCO7OW5P2PP7WDN6YUDXUUOPAR4ZHJSDDCZTIAQRTRZHKQWV45WUPBWX", + "base_amount": "4433.2000000", + "base_asset_type": "native", + "counter_offer_id": "4719135487309144065", + "counter_account": "GD3CJYUTZAY6JQF4CEI6Z7VW5O6VNGKZTBYUECTOJPEDTB7I2HZSPI2K", + "counter_amount": "443.3200000", + "counter_asset_type": "credit_alphanum4", + "counter_asset_code": "BB1", + "counter_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "base_is_seller": true, + "price": { + "n": "1", + "d": 10 + } + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperation.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperation.md new file mode 100644 index 00000000..13fc61c4 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperation.md @@ -0,0 +1,127 @@ +--- +title: "getOperation" +slug: "rpc-stellar-getoperation" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + operationId: "OPERATION_ID", + join: true, +}; + +// Retrieve information about a specific operation +const operationInfo = await tatum.rpc.getOperation(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getOperation` method allows you to retrieve detailed information about a specific operation on the Stellar blockchain by providing the operation's unique identifier. + +### Example use cases: + +1. **Operation Information Retrieval:** + Developers and applications can use this method to retrieve detailed information about a specific operation on the Stellar network. + +2. **Operation Verification:** + Users can verify the details of an operation, including its type, source account, destination account, and other relevant information. + +### Request Parameters + +The `getOperation` method accepts the following parameters: + +- `operationId` (string, required): + The unique identifier of the operation for which you want to retrieve information. + +- `join` (boolean, optional): + An optional parameter to join results. If set to true, results will be joined. Defaults to false. + +### Return Object + +The `getOperation` method returns detailed information about the specified operation on the Stellar blockchain. The response includes data such as the operation ID, source account, destination account, type of operation, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=215271955673231361&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=215271955673128961&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673128961" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/bf3e8c575c463bff1c23c1a7113b38d1cb79c983be62bf696dc96632ef00af47" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673128961/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673128961" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673128961" + } + }, + "id": "215271955673128961", + "paging_token": "215271955673128961", + "transaction_successful": true, + "source_account": "GBARZTOSSCH3XDC7NMRIHQVOWEYX7VOBQ4TZTR4HZRBZS3UO7QID242H", + "type": "manage_sell_offer", + "type_i": 3, + "created_at": "2024-01-28T14:07:11Z", + "transaction_hash": "bf3e8c575c463bff1c23c1a7113b38d1cb79c983be62bf696dc96632ef00af47", + "amount": "0.1833209", + "price": "5.4578916", + "price_r": { + "n": 545789163, + "d": 100000000 + }, + "buying_asset_type": "native", + "selling_asset_type": "credit_alphanum4", + "selling_asset_code": "RIO", + "selling_asset_issuer": "GBNLJIYH34UWO5YZFA3A3HD3N76R6DOI33N4JONUOHEEYZYCAYTEJ5AK", + "offer_id": "1461815697" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperationeffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperationeffects.md new file mode 100644 index 00000000..f41febb9 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperationeffects.md @@ -0,0 +1,120 @@ +--- +title: "getOperationEffects" +slug: "rpc-stellar-getoperationeffects" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:00 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + operationId: "OPERATION_ID", + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// Retrieve effects of a specific operation +const operationEffects = await tatum.rpc.getOperationEffects(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getOperationEffects` method allows you to retrieve the effects of a specific operation on the Stellar blockchain by providing the operation's unique identifier. + +### Example use cases: + +1. **Effect Information Retrieval:** + Developers and applications can use this method to retrieve detailed information about the effects of a specific operation on the Stellar network. + +2. **Effect Analysis:** + Users can analyze the effects of an operation, which may include details about changes to account balances, trustlines, data entries, and more. + +### Request Parameters + +The `getOperationEffects` method accepts a single `params` object with the following properties: + +- `operationId` (string, required): + The unique identifier of the operation for which you want to retrieve effects. + +- `cursor` (string, optional): + An optional cursor to start listing effects from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of effects to return. The limit can range from 1 to 200. + +### Return Object + +The `getOperationEffects` method returns an array of effects related to the specified operation on the Stellar blockchain. Each effect object contains information about the changes that occurred as a result of the operation. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations//effects?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations//effects?cursor=215271955673288705-1&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations//effects?cursor=215271955673169921-1&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "operation": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673169921" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673169921-1" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673169921-1" + } + }, + "id": "0215271955673169921-0000000001", + "paging_token": "215271955673169921-1", + "account": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", + "type": "account_credited", + "type_i": 2, + "created_at": "2024-01-28T14:07:11Z", + "asset_type": "credit_alphanum4", + "asset_code": "yXLM", + "asset_issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55", + "amount": "1.0291984" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperations.md new file mode 100644 index 00000000..99264e4e --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getoperations.md @@ -0,0 +1,142 @@ +--- +title: "getOperations" +slug: "rpc-stellar-getoperations" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:03 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, + includeFailed: true, + join: true, +}; + +// List all successful operations +const allOperations = await tatum.rpc.listAllOperations(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `listAllOperations` method allows you to list all successful operations on the Stellar blockchain. + +### Example use cases: + +1. **Operation Monitoring:** + Developers and applications can use this method to monitor and retrieve information about all successful operations on the Stellar network. + +2. **Operation Filtering:** + Platform administrators can filter and search for specific operations based on various criteria, such as cursor, order, and more. + +3. **Streaming Operations:** + Users can use streaming mode to listen for new operations as they are added to the Stellar ledger. + +### Request Parameters + +The `listAllOperations` method accepts a single `params` object with the following properties: + +- `cursor` (string, optional): + An optional cursor to start listing operations from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of operations to return. The limit can range from 1 to 200. + +- `includeFailed` (boolean, optional): + An optional parameter to include failed operations. If set to true, failed operations will be included in the results. Defaults to false. + +- `join` (boolean, optional): + An optional parameter to join results. If set to true, results will be joined. Defaults to false. + +### Return Object + +The `listAllOperations` method returns an array of successful operations on the Stellar blockchain. Each operation object contains information such as the operation ID, source account, destination account, type of operation, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=215271955673231361&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations?cursor=215271955673128961&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673128961" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/bf3e8c575c463bff1c23c1a7113b38d1cb79c983be62bf696dc96632ef00af47" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673128961/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673128961" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673128961" + } + }, + "id": "215271955673128961", + "paging_token": "215271955673128961", + "transaction_successful": true, + "source_account": "GBARZTOSSCH3XDC7NMRIHQVOWEYX7VOBQ4TZTR4HZRBZS3UO7QID242H", + "type": "manage_sell_offer", + "type_i": 3, + "created_at": "2024-01-28T14:07:11Z", + "transaction_hash": "bf3e8c575c463bff1c23c1a7113b38d1cb79c983be62bf696dc96632ef00af47", + "amount": "0.1833209", + "price": "5.4578916", + "price_r": { + "n": 545789163, + "d": 100000000 + }, + "buying_asset_type": "native", + "selling_asset_type": "credit_alphanum4", + "selling_asset_code": "RIO", + "selling_asset_issuer": "GBNLJIYH34UWO5YZFA3A3HD3N76R6DOI33N4JONUOHEEYZYCAYTEJ5AK", + "offer_id": "1461815697" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getorderbook.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getorderbook.md new file mode 100644 index 00000000..6b27f797 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getorderbook.md @@ -0,0 +1,173 @@ +--- +title: "getOrderBook" +slug: "rpc-stellar-getorderbook" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:07 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + sellingAssetType: "SELLING_ASSET_TYPE", + sellingAssetIssuer: "SELLING_ASSET_ISSUER", + sellingAssetCode: "SELLING_ASSET_CODE", + buyingAssetType: "BUYING_ASSET_TYPE", + buyingAssetIssuer: "BUYING_ASSET_ISSUER", + buyingAssetCode: "BUYING_ASSET_CODE", + limit: 10, +}; + +// Retrieve an order book +const orderBook = await tatum.rpc.getOrderBook(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getOrderBook` method allows you to retrieve an order book for a specific trading pair on the Stellar blockchain. The order book provides information about the current bids and asks for the specified assets. + +### Example use cases: + +1. **Order Book Data Retrieval:** + Developers and applications can use this method to retrieve order book data for trading pairs on the Stellar network. + +2. **Trading Pair Analysis:** + Traders and investors can analyze the current order book to make informed decisions about buying or selling assets. + +3. **Streaming Order Book:** + Users can use streaming mode to listen for updates to the order book in real-time. + +### Request Parameters + +The `getOrderBook` method accepts a single `params` object with the following properties: + +- `sellingAssetType` (string, required): + The asset type of the selling asset (e.g., "native" or "credit_alphanum4" or "credit_alphanum12"). + +- `sellingAssetIssuer` (string, optional): + The issuer account of the selling asset (required if the selling asset type is not "native"). + +- `sellingAssetCode` (string, optional): + The asset code of the selling asset (required if the selling asset type is not "native"). + +- `buyingAssetType` (string, required): + The asset type of the buying asset (e.g., "native" or "credit_alphanum4" or "credit_alphanum12"). + +- `buyingAssetIssuer` (string, optional): + The issuer account of the buying asset (required if the buying asset type is not "native"). + +- `buyingAssetCode` (string, optional): + The asset code of the buying asset (required if the buying asset type is not "native"). + +- `limit` (number, optional): + An optional parameter to specify the maximum number of bids and asks to return. The limit can range from 1 to 200. + +### Return Object + +The `getOrderBook` method returns an order book for the specified trading pair on the Stellar blockchain. The order book includes a list of bids (buy orders) and asks (sell orders) with details such as price and quantity. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "bids": [ + { + "price_r": { + "n": "10000000", + "d": "139999999" + }, + "price": "0.0714286", + "amount": "24.9999990" + }, + { + "price_r": { + "n": "1", + "d": "14" + }, + "price": "0.0714286", + "amount": "188.0000000" + }, + { + "price_r": { + "n": "1", + "d": "15" + }, + "price": "0.0666667", + "amount": "230.3200000" + }, + { + "price_r": { + "n": "1", + "d": "16" + }, + "price": "0.0625000", + "amount": "50.0000000" + } + ], + "asks": [ + { + "price_r": { + "n": "5000000", + "d": "62500001" + }, + "price": "0.0800000", + "amount": "4.9400001" + }, + { + "price_r": { + "n": "10000000", + "d": "125000001" + }, + "price": "0.0800000", + "amount": "2516.5154327" + }, + { + "price_r": { + "n": "2", + "d": "25" + }, + "price": "0.0800000", + "amount": "3125.0000000" + }, + { + "price_r": { + "n": "4", + "d": "49" + }, + "price": "0.0816327", + "amount": "4593.7500000" + } + ], + "base": { + "asset_type": "native" + }, + "counter": { + "asset_type": "credit_alphanum4", + "asset_code": "BB1", + "asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN" + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getpayments.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getpayments.md new file mode 100644 index 00000000..b5d44909 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getpayments.md @@ -0,0 +1,162 @@ +--- +title: "getPayments" +slug: "rpc-stellar-getpayments" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, + includeFailed: true, + join: true, +}; + +// List all successful payment-related operations +const allPayments = await tatum.rpc.listAllPayments(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `listAllPayments` method allows you to list all successful payment-related operations on the Stellar blockchain. + +### Example use cases: + +1. **Payment Monitoring:** + Developers and applications can use this method to monitor and retrieve information about all successful payment-related operations on the Stellar network. + +2. **Payment Filtering:** + Platform administrators can filter and search for specific payments based on various criteria, such as cursor, order, and more. + +3. **Streaming Payments:** + Users can use streaming mode to listen for new payments as they are added to the Stellar ledger. + +### Request Parameters + +The `listAllPayments` method accepts a single `params` object with the following properties: + +- `cursor` (string, optional): + An optional cursor to start listing payments from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of payments to return. The limit can range from 1 to 200. + +- `includeFailed` (boolean, optional): + An optional parameter to include failed payments. If set to true, failed payments will be included in the results. Defaults to false. + +- `join` (boolean, optional): + An optional parameter to join results. If set to true, results will be joined. Defaults to false. + +### Return Object + +The `listAllPayments` method returns an array of successful payment-related operations on the Stellar blockchain. Each operation object corresponds to a payment operation, and it contains information such as the operation ID, source account, destination account, amount, asset, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/payments?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/payments?cursor=215271955673706503&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/payments?cursor=215271955673169921&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673169921" + }, + "transaction": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/transactions/c2b52adc99766007cf1cb1f218b2c40b9771123450282e0d6e3c0be69159880d" + }, + "effects": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/215271955673169921/effects" + }, + "succeeds": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=desc&cursor=215271955673169921" + }, + "precedes": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/effects?order=asc&cursor=215271955673169921" + } + }, + "id": "215271955673169921", + "paging_token": "215271955673169921", + "transaction_successful": true, + "source_account": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", + "type": "path_payment_strict_send", + "type_i": 13, + "created_at": "2024-01-28T14:07:11Z", + "transaction_hash": "c2b52adc99766007cf1cb1f218b2c40b9771123450282e0d6e3c0be69159880d", + "asset_type": "credit_alphanum4", + "asset_code": "yXLM", + "asset_issuer": "GARDNV3Q7YGT4AKSDF25LT32YSCCW4EV22Y2TV3I2PU2MMXJTEDL5T55", + "from": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", + "to": "GCEETSI6ZGG3CS37YUFAUKCCJSCOILXL43JOJVZ435KBJ5NICDYY4EMP", + "amount": "1.0291984", + "path": [ + { + "asset_type": "credit_alphanum4", + "asset_code": "PL", + "asset_issuer": "GBV34DLSYPWQYJTWGC6AYDRNSU7YM244SD4NLPBLDR7D74PZMFEL5OMG" + }, + { + "asset_type": "credit_alphanum4", + "asset_code": "XRP", + "asset_issuer": "GCNSGHUCG5VMGLT5RIYYZSO7VQULQKAJ62QA33DBC5PPBSO57LFWVV6P" + }, + { + "asset_type": "credit_alphanum4", + "asset_code": "XRP", + "asset_issuer": "GBXRPL45NPHCVMFFAYZVUVFFVKSIZ362ZXFP7I2ETNQ3QKZMFLPRDTD5" + }, + { + "asset_type": "credit_alphanum4", + "asset_code": "SHX", + "asset_issuer": "GDSTRSHXHGJ7ZIVRBXEYE5Q74XUVCUSEKEBR7UCHEUUEK72N7I7KJ6JH" + } + ], + "source_amount": "1.0000000", + "destination_min": "1.0000000", + "source_asset_type": "native" + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictreceivepaymentpaths.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictreceivepaymentpaths.md new file mode 100644 index 00000000..6c783390 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictreceivepaymentpaths.md @@ -0,0 +1,194 @@ +--- +title: "getStrictReceivePaymentPaths" +slug: "rpc-stellar-getstrictreceivepaymentpaths" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + sourceAccount: "SOURCE_ACCOUNT", + sourceAssets: ["CODE:ISSUER_ACCOUNT", "CODE:ISSUER_ACCOUNT2"], + destinationAssetType: "DESTINATION_ASSET_TYPE", + destinationAssetIssuer: "DESTINATION_ASSET_ISSUER", + destinationAssetCode: "DESTINATION_ASSET_CODE", + destinationAmount: "DESTINATION_AMOUNT", +}; + +// List strict receive payment paths +const paymentPaths = await tatum.rpc.listStrictReceivePaymentPaths(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `listStrictReceivePaymentPaths` method allows you to list the payment paths a payment can take based on the amount of an asset you want the recipient to receive. The destination asset amount remains constant, and the type and amount of the source asset sent varies based on offers in the order books. The methods requires either a list of source assets or a source account. Both fields cannot be present. + +### Example use cases: + +1. **Payment Path Analysis:** + Developers and applications can use this method to analyze and retrieve payment paths based on specific destination amounts and assets. + +2. **Payment Path Selection:** + Users can select the optimal payment path to ensure that a recipient receives a specific amount of a destination asset. + +3. **Streaming Payment Paths:** + Users can use streaming mode to listen for updates to payment paths in real-time. + +### Request Parameters + +The `listStrictReceivePaymentPaths` method accepts a `params` object with the following properties: + +- `sourceAccount` (string, required if sourceAssets are not selected): + The source account from which to start the payment path search. + +- `sourceAssets` (array of strings, required if sourceAccount is not selected): + An array of source assets that are available to the sender. A comma-separated list of assets available to the sender. Any returned path must start with an asset in this list. Each asset is formatted as CODE:ISSUER_ACCOUNT. For example: USD:GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX. Using either source_account or source_assets as an argument is required for strict receive path payments. + +- `destinationAssetType` (string, required): + The asset type of the destination asset (e.g., "native" or "credit_alphanum4" or "credit_alphanum12"). + +- `destinationAssetIssuer` (string, optional): + The issuer account of the destination asset (required if the destination asset type is not "native"). + +- `destinationAssetCode` (string, optional): + The asset code of the destination asset (required if the destination asset type is not "native"). + +- `destinationAmount` (string, required): + The amount of the destination asset that the recipient should receive. + +### Return Object + +The `listStrictReceivePaymentPaths` method returns a list of payment paths from the source assets to the destination asset that satisfy the specified destination amount. Each path includes details about the source and destination assets, as well as the offers in the order books that make up the path. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_embedded": { + "records": [ + { + "source_asset_type": "credit_alphanum4", + "source_asset_code": "CNY", + "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", + "source_amount": "28.9871131", + "destination_asset_type": "credit_alphanum4", + "destination_asset_code": "BB1", + "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "destination_amount": "5.0000000", + "path": [ + { + "asset_type": "credit_alphanum4", + "asset_code": "XCN", + "asset_issuer": "GCNY5OXYSY4FKHOPT2SPOQZAOEIGXB5LBYW3HVU3OWSTQITS65M5RCNY" + }, + { + "asset_type": "native" + } + ] + }, + { + "source_asset_type": "credit_alphanum4", + "source_asset_code": "CNY", + "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", + "source_amount": "29.0722784", + "destination_asset_type": "credit_alphanum4", + "destination_asset_code": "BB1", + "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "destination_amount": "5.0000000", + "path": [ + { + "asset_type": "credit_alphanum4", + "asset_code": "ULT", + "asset_issuer": "GC76RMFNNXBFDSJRBXCABWLHXDK4ITVQSMI56DC2ZJVC3YOLLPCKKULT" + }, + { + "asset_type": "native" + } + ] + }, + { + "source_asset_type": "credit_alphanum4", + "source_asset_code": "CNY", + "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", + "source_amount": "29.4000002", + "destination_asset_type": "credit_alphanum4", + "destination_asset_code": "BB1", + "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "destination_amount": "5.0000000", + "path": [ + { + "asset_type": "native" + } + ] + }, + { + "source_asset_type": "credit_alphanum4", + "source_asset_code": "CNY", + "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", + "source_amount": "31.8955888", + "destination_asset_type": "credit_alphanum4", + "destination_asset_code": "BB1", + "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "destination_amount": "5.0000000", + "path": [ + { + "asset_type": "credit_alphanum4", + "asset_code": "USD", + "asset_issuer": "GBUYUAI75XXWDZEKLY66CFYKQPET5JR4EENXZBUZ3YXZ7DS56Z4OKOFU" + }, + { + "asset_type": "native" + } + ] + }, + { + "source_asset_type": "credit_alphanum4", + "source_asset_code": "CNY", + "source_asset_issuer": "GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX", + "source_amount": "34.7086084", + "destination_asset_type": "credit_alphanum4", + "destination_asset_code": "BB1", + "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "destination_amount": "5.0000000", + "path": [ + { + "asset_type": "credit_alphanum4", + "asset_code": "USD", + "asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX" + }, + { + "asset_type": "native" + } + ] + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictsendpaymentpaths.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictsendpaymentpaths.md new file mode 100644 index 00000000..a85c0452 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-getstrictsendpaymentpaths.md @@ -0,0 +1,142 @@ +--- +title: "getStrictSendPaymentPaths" +slug: "rpc-stellar-getstrictsendpaymentpaths" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:04 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + sourceAccount: "SOURCE_ACCOUNT", + sourceAssets: ["SOURCE_ASSET_1", "SOURCE_ASSET_2"], + sourceAssetType: "SOURCE_ASSET_TYPE", + sourceAssetIssuer: "SOURCE_ASSET_ISSUER", + sourceAssetCode: "SOURCE_ASSET_CODE", + sourceAmount: "SOURCE_AMOUNT", + destinationAccount: "DESTINATION_ACCOUNT", + destinationAssets: ["DESTINATION_ASSET_1", "DESTINATION_ASSET_2"], +}; + +// List strict send payment paths +const paymentPaths = await tatum.rpc.getStrictSendPaymentPaths(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getStrictSendPaymentPaths` method allows you to list the payment paths a payment can take based on the amount of a source asset you want to send. The source asset amount remains constant, and the type and amount of the asset received vary based on offers in the order books. + +### Example use cases: + +1. **Payment Path Analysis:** + Developers and applications can use this method to analyze and retrieve payment paths based on specific source amounts and assets. + +2. **Payment Path Selection:** + Users can select the optimal payment path to send a specific source amount and receive a variable amount of a destination asset. + +3. **Streaming Payment Paths:** + Users can use streaming mode to listen for updates to payment paths in real-time. + +### Request Parameters + +The `getStrictSendPaymentPaths` method accepts a `params` object with the following properties: + +- `sourceAccount` (string, optional): + The source account from which to start the payment path search. + +- `sourceAssets` (array of strings, optional): + An array of source assets that the sender wants to send. + +- `sourceAssetType` (string, required): + The asset type of the source asset (e.g., "native" or "credit_alphanum4" or "credit_alphanum12"). + +- `sourceAssetIssuer` (string, optional): + The issuer account of the source asset (required if the source asset type is not "native"). + +- `sourceAssetCode` (string, optional): + The asset code of the source asset (required if the source asset type is not "native"). + +- `sourceAmount` (string, required): + The constant amount of the source asset that the sender wants to send. + +- `destinationAccount` (string, required if destinationAssets are not present): + The destination account to which the recipient can receive the assets. + +- `destinationAssets` (array of strings, required if destinationAccount is not present): + An array of destination assets that the recipient can receive. + +### Return Object + +The `getStrictSendPaymentPaths` method returns a list of payment paths from the source assets to the destination asset that satisfy the specified source amount. Each path includes details about the source and destination assets, as well as the offers in the order books that make up the path. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_embedded": { + "records": [ + { + "source_asset_type": "credit_alphanum4", + "source_asset_code": "BRL", + "source_asset_issuer": "GDVKY2GU2DRXWTBEYJJWSFXIGBZV6AZNBVVSUHEPZI54LIS6BA7DVVSP", + "source_amount": "400.0000000", + "destination_asset_type": "credit_alphanum4", + "destination_asset_code": "BB1", + "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "destination_amount": "87.6373649", + "path": [ + { + "asset_type": "native" + } + ] + }, + { + "source_asset_type": "credit_alphanum4", + "source_asset_code": "BRL", + "source_asset_issuer": "GDVKY2GU2DRXWTBEYJJWSFXIGBZV6AZNBVVSUHEPZI54LIS6BA7DVVSP", + "source_amount": "400.0000000", + "destination_asset_type": "credit_alphanum4", + "destination_asset_code": "BB1", + "destination_asset_issuer": "GD5J6HLF5666X4AZLTFTXLY46J5SW7EXRKBLEYPJP33S33MXZGV6CWFN", + "destination_amount": "36.0841597", + "path": [ + { + "asset_type": "native" + }, + { + "asset_type": "credit_alphanum4", + "asset_code": "EURT", + "asset_issuer": "GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S" + } + ] + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettradeaggregations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettradeaggregations.md new file mode 100644 index 00000000..81c45e37 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettradeaggregations.md @@ -0,0 +1,188 @@ +--- +title: "getTradeAggregations" +slug: "rpc-stellar-gettradeaggregations" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + startTime: "START_TIME", + endTime: "END_TIME", + resolution: "RESOLUTION", + offset: "OFFSET", + baseAssetType: "BASE_ASSET_TYPE", + baseAssetIssuer: "BASE_ASSET_ISSUER", + baseAssetCode: "BASE_ASSET_CODE", + counterAssetType: "COUNTER_ASSET_TYPE", + counterAssetIssuer: "COUNTER_ASSET_ISSUER", + counterAssetCode: "COUNTER_ASSET_CODE", + order: "asc", + limit: 10, +}; + +// List trade aggregations +const tradeAggregations = await tatum.rpc.getTradeAggregations(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getTradeAggregations` method allows you to list trade data based on filters set in the arguments. It divides a given time range into segments and aggregates statistics for a given asset pair (base, counter) over each of these segments. The duration of the segments is specified with the `resolution` parameter. The `startTime` and `endTime` parameters define the start and end of the time range, which are both rounded to the nearest multiple of `resolution` since epoch. The individual segments are also aligned with multiples of `resolution` since epoch. If you want to change this alignment, the segments can be offset by specifying the `offset` parameter. + +### Example use cases: + +1. **Trade Data Analysis:** + Developers and applications can use this method to analyze and retrieve aggregated trade data for specific asset pairs over a specified time range. + +2. **Historical Trade Statistics:** + Users can request historical trade statistics for asset pairs to gain insights into trading activity. + +3. **Trade Data Visualization:** + Data visualization tools can use this method to generate charts and graphs of trade data over time. + +### Request Parameters + +The `getTradeAggregations` method accepts a `params` object with the following properties: + +- `startTime` (string, optional): + The start time of the time range for trade aggregations. + +- `endTime` (string, optional): + The end time of the time range for trade aggregations. + +- `resolution` (string, optional): + The duration of each aggregation segment (e.g., '1d' for one day, '1h' for one hour). + +- `offset` (string, optional): + An optional parameter to offset the segments from multiples of `resolution` since epoch. + +- `baseAssetType` (string, required): + The asset type of the base asset (e.g., 'native' or 'credit_alphanum4' or 'credit_alphanum12'). + +- `baseAssetIssuer` (string, optional): + The issuer account of the base asset (required if the base asset type is not 'native'). + +- `baseAssetCode` (string, optional): + The asset code of the base asset (required if the base asset type is not 'native'). + +- `counterAssetType` (string, required): + The asset type of the counter asset (e.g., 'native' or 'credit_alphanum4' or 'credit_alphanum12'). + +- `counterAssetIssuer` (string, optional): + The issuer account of the counter asset (required if the counter asset type is not 'native'). + +- `counterAssetCode` (string, optional): + The asset code of the counter asset (required if the counter asset type is not 'native'). + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of trade aggregations to return. The limit can range from 1 to 200. + +### Return Object + +The `getTradeAggregations` method returns an array of trade aggregations based on the specified parameters. Each trade aggregation object contains statistics and data for a specific time segment and asset pair. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_links": { + "self": { + "href": "https://horizon.stellar.org/trade_aggregations?base_asset_type=native&counter_asset_code=EURT&counter_asset_issuer=GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S&counter_asset_type=credit_alphanum4&resolution=3600000&start_time=1582156800000&end_time=1582178400001" + }, + "next": { + "href": "https://horizon.stellar.org/trade_aggregations?base_asset_type=native&counter_asset_code=EURT&counter_asset_issuer=GAP5LETOV6YIE62YAM56STDANPRDO7ZFDBGSNHJQIYGGKSMOZAHOOS2S&counter_asset_type=credit_alphanum4&end_time=1582178400001&resolution=3600000&start_time=1582171200000" + }, + "prev": { + "href": "" + } + }, + "_embedded": { + "records": [ + { + "timestamp": 1582164000000, + "trade_count": 3, + "base_volume": "399.3873200", + "counter_volume": "25.5368082", + "avg": "0.0639400", + "high": "0.0652169", + "high_r": { + "N": 652169, + "D": 10000000 + }, + "low": "0.0638338", + "low_r": { + "N": 8107550, + "D": 127010393 + }, + "open": "0.0652169", + "open_r": { + "N": 652169, + "D": 10000000 + }, + "close": "0.0638338", + "close_r": { + "N": 8107550, + "D": 127010393 + } + }, + { + "timestamp": 1582167600000, + "trade_count": 1, + "base_volume": "149.8415320", + "counter_volume": "9.7149804", + "avg": "0.0648350", + "high": "0.0648350", + "high_r": { + "N": 5000000, + "D": 77118803 + }, + "low": "0.0648350", + "low_r": { + "N": 5000000, + "D": 77118803 + }, + "open": "0.0648350", + "open_r": { + "N": 5000000, + "D": 77118803 + }, + "close": "0.0648350", + "close_r": { + "N": 5000000, + "D": 77118803 + } + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettrades.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettrades.md new file mode 100644 index 00000000..ecfa2607 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettrades.md @@ -0,0 +1,155 @@ +--- +title: "getTrades" +slug: "rpc-stellar-gettrades" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define input parameters as an object (Replace placeholders with actual values and remove redundant) +const params = { + offerId: "YOUR_OFFER_ID", + baseAssetType: "YOUR_BASE_ASSET_TYPE", + baseAssetIssuer: "YOUR_BASE_ASSET_ISSUER", + baseAssetCode: "YOUR_BASE_ASSET_CODE", + counterAssetType: "YOUR_COUNTER_ASSET_TYPE", + counterAssetIssuer: "YOUR_COUNTER_ASSET_ISSUER", + counterAssetCode: "YOUR_COUNTER_ASSET_CODE", + tradeType: "YOUR_TRADE_TYPE", + cursor: "YOUR_CURSOR", + order: "YOUR_ORDER", + limit: 10, +}; + +// List all trades or use streaming mode to listen for new trades +const trades = await tatum.rpc.listTrades(params); + +// Log the list of trades +console.log("Trades:", trades); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `listTrades` method allows you to list all trades on the Stellar blockchain. You can also use streaming mode to listen for new trades as they are added to the Stellar ledger. When called in streaming mode, Horizon will start at the earliest known trade unless a cursor is set, in which case it will start from that cursor. + +### Request Parameters + +The `listTrades` method accepts the following request parameters: + +- `offerId` (string, optional): + The identifier of the offer to filter trades. Use this parameter to list trades for a specific offer. + +- `baseAssetType` (string, optional): + The asset type of the base asset to filter trades. Use this parameter to filter trades by the base asset type. + +- `baseAssetIssuer` (string, optional): + The issuer account of the base asset to filter trades. Use this parameter to filter trades by the base asset issuer. + +- `baseAssetCode` (string, optional): + The asset code of the base asset to filter trades. Use this parameter to filter trades by the base asset code. + +- `counterAssetType` (string, optional): + The asset type of the counter asset to filter trades. Use this parameter to filter trades by the counter asset type. + +- `counterAssetIssuer` (string, optional): + The issuer account of the counter asset to filter trades. Use this parameter to filter trades by the counter asset issuer. + +- `counterAssetCode` (string, optional): + The asset code of the counter asset to filter trades. Use this parameter to filter trades by the counter asset code. + +- `tradeType` (string, optional): + The type of trade to filter. Use this parameter to filter trades by trade type. + +- `cursor` (string, optional): + A cursor value that determines the starting point for pagination. Use this parameter to retrieve trades from a specific point in the list. + +- `order` (string, optional): + A designation of the order in which records should appear. Options include 'asc' (ascending) or 'desc' (descending). If this argument isn’t set, it defaults to 'asc'. + +- `limit` (number, optional): + The maximum number of records returned. It defines the number of trades to fetch in a single request. + +### Response + +The `listTrades` method returns a JSON object containing the list of trades that match the specified criteria. Each trade is represented as an object with various properties describing its characteristics. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "_links": { + "self": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/trades?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/trades?cursor=214305588031721473-2&limit=10&order=asc" + }, + "prev": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/trades?cursor=214305588031623169-0&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "" + }, + "base": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GBZVMDOMNU5ZNDAUVHCSZXFJ6FJRBNXFL6NTY2BBANBVNM6NWPGTFUCV" + }, + "counter": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/accounts/GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ" + }, + "operation": { + "href": "https://01-vinthill-068-01.rpc.tatum.io/operations/214305588031623169" + } + }, + "id": "214305588031623169-0", + "paging_token": "214305588031623169-0", + "ledger_close_time": "2024-01-13T08:44:04Z", + "trade_type": "orderbook", + "base_offer_id": "1449996661", + "base_account": "GBZVMDOMNU5ZNDAUVHCSZXFJ6FJRBNXFL6NTY2BBANBVNM6NWPGTFUCV", + "base_amount": "1.0756875", + "base_asset_type": "credit_alphanum4", + "base_asset_code": "MOBI", + "base_asset_issuer": "GA6HCMBLTZS5VYYBCATRBRZ3BZJMAFUDKYYF6AH6MVCMGWMRDNSWJPIH", + "counter_offer_id": "4825991606459011073", + "counter_account": "GA4QH4AJGERVYX4PBY55JYTQJ4RTLJIBYV7OCYIV56LWZE5MVDH3R3UQ", + "counter_amount": "0.0959902", + "counter_asset_type": "native", + "base_is_seller": true, + "price": { + "n": "10000000", + "d": "112062267" + } + } + ] + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransaction.md new file mode 100644 index 00000000..d26b5007 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransaction.md @@ -0,0 +1,113 @@ +--- +title: "getTransaction" +slug: "rpc-stellar-gettransaction" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:05 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const transactionHash = "YOUR_TRANSACTION_HASH"; + +// Retrieve a specific transaction by its hash +const transaction = await tatum.rpc.getTransaction(transactionHash); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getTransaction` method allows you to retrieve information about a specific transaction on the Stellar blockchain. You can specify the transaction you want to retrieve by providing its unique transaction hash. + +### Example use cases: + +1. **Transaction Details:** + Developers and applications can use this method to fetch detailed information about a specific transaction, including its source, destination, amount, and other transaction-specific data. + +2. **Transaction Verification:** + Users can use this method to verify and validate specific transactions on the Stellar network. + +3. **Auditing and Reporting:** + Platform administrators can access transaction data for auditing and reporting purposes. + +### Request Parameters + +The `getTransaction` method accepts a `transactionHash` parameter, which is a string representing the unique hash of the transaction you want to retrieve. + +- `transactionHash` (string, required): + The unique hash of the transaction you want to retrieve. + +### Return Object + +The `getTransaction` method returns detailed information about the specified transaction on the Stellar blockchain. The response includes data such as the transaction ID, source account, destination account, amount, fee, and other transaction-specific details. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_links": { + "self": { + "href": "https://horizon.stellar.org/transactions/5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc" + }, + "account": { + "href": "https://horizon.stellar.org/accounts/GDI5EK4HNMBHJJQGP3GUXQJIIOHU2CJO3LABPWD6WYSPJZP5NP67TMNN" + }, + "ledger": { + "href": "https://horizon.stellar.org/ledgers/27963785" + }, + "operations": { + "href": "https://horizon.stellar.org/transactions/5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc/operations{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://horizon.stellar.org/transactions/5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc/effects{?cursor,limit,order}", + "templated": true + }, + "precedes": { + "href": "https://horizon.stellar.org/transactions?order=asc&cursor=120103542047408128" + }, + "succeeds": { + "href": "https://horizon.stellar.org/transactions?order=desc&cursor=120103542047408128" + } + }, + "id": "5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc", + "paging_token": "120103542047408128", + "successful": true, + "hash": "5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc", + "ledger": 27963785, + "created_at": "2020-01-28T10:03:33Z", + "source_account": "GDI5EK4HNMBHJJQGP3GUXQJIIOHU2CJO3LABPWD6WYSPJZP5NP67TMNN", + "source_account_sequence": "65046128646685383", + "fee_charged": 100, + "max_fee": 100, + "operation_count": 1, + "envelope_xdr": "hex data", + "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=", + "result_meta_xdr": "hex data", + "fee_meta_xdr": "hex data" + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactioneffects.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactioneffects.md new file mode 100644 index 00000000..1d385ffa --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactioneffects.md @@ -0,0 +1,143 @@ +--- +title: "getTransactionEffects" +slug: "rpc-stellar-gettransactioneffects" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 12:59:43 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + hash: "YOUR_TRANSACTION_HASH", // Replace with the actual transaction hash + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, +}; + +// Get effects for a specific transaction +const transactionEffects = await tatum.rpc.getTransactionsEffects(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `Retrieve a Transaction's Effects` method allows you to retrieve the effects of a specific transaction on the Stellar blockchain. You can use this method to view the various effects produced by the transaction, such as offers created, payments made, and more. + +### Example use cases: + +1. **Transaction Analysis:** + Developers and applications can use this method to analyze the effects of a particular transaction, including its impact on the Stellar network. + +2. **Auditing and Reporting:** + Users can retrieve the effects of a transaction for auditing and reporting purposes. + +### Request Parameters + +The `Retrieve a Transaction's Effects` method accepts the following parameters: + +- `hash` (string, required): + The hash of the transaction for which you want to retrieve effects. + +- `cursor` (string, optional): + An optional cursor to start listing effects from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of effects to return. The limit can range from 1 to 200. + +### Return Object + +The `Retrieve a Transaction's Effects` method returns an array of effects associated with the specified transaction on the Stellar blockchain. Each effect object contains information such as the effect type, asset details, and other relevant data. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +Feel free to replace `'YOUR_TRANSACTION_HASH'` with the actual hash of the transaction you want to retrieve effects for. + +```json +{ + "value": { + "_links": { + "self": { + "href": "https://horizon.stellar.org/transactions/512a9946bc7ff4a363299f14f79e0beb9b9cdbd0103e3a69a44446a0aa6471a8/effects?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://horizon.stellar.org/transactions/512a9946bc7ff4a363299f14f79e0beb9b9cdbd0103e3a69a44446a0aa6471a8/effects?cursor=121628667754319873-2&limit=10&order=asc" + }, + "prev": { + "href": "https://horizon.stellar.org/transactions/512a9946bc7ff4a363299f14f79e0beb9b9cdbd0103e3a69a44446a0aa6471a8/effects?cursor=121628667754319873-1&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "operation": { + "href": "https://horizon.stellar.org/operations/121628667754319873" + }, + "succeeds": { + "href": "https://horizon.stellar.org/effects?order=desc&cursor=121628667754319873-1" + }, + "precedes": { + "href": "https://horizon.stellar.org/effects?order=asc&cursor=121628667754319873-1" + } + }, + "id": "0121628667754319873-0000000001", + "paging_token": "121628667754319873-1", + "account": "GAHK7EEG2WWHVKDNT4CEQFZGKF2LGDSW2IVM4S5DP42RBW3K6BTODB4A", + "type": "account_credited", + "type_i": 2, + "created_at": "2020-02-20T21:18:33Z", + "asset_type": "native", + "amount": "1573.5112616" + }, + { + "_links": { + "operation": { + "href": "https://horizon.stellar.org/operations/121628667754319873" + }, + "succeeds": { + "href": "https://horizon.stellar.org/effects?order=desc&cursor=121628667754319873-2" + }, + "precedes": { + "href": "https://horizon.stellar.org/effects?order=asc&cursor=121628667754319873-2" + } + }, + "id": "0121628667754319873-0000000002", + "paging_token": "121628667754319873-2", + "account": "GA2XP4KMY4KWNPW4KUCUKYUF2J7Y6HO5HLPUEA3VPVSMYCM3TGNEZP5S", + "type": "account_debited", + "type_i": 3, + "created_at": "2020-02-20T21:18:33Z", + "asset_type": "native", + "amount": "1573.5112616" + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactionoperations.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactionoperations.md new file mode 100644 index 00000000..c9a959c3 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactionoperations.md @@ -0,0 +1,145 @@ +--- +title: "getTransactionOperations" +slug: "rpc-stellar-gettransactionoperations" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:01 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from '@tatumio/tatum'; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + transactionHash: 'TRANSACTION_HASH' + cursor: 'YOUR_CURSOR', + order: 'asc', + limit: 10, + includeFailed: true, + join: true +}; + +// Get operations for a specific transaction +const transactionOperations = await tatum.rpc.getTransactionsOperations(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getTransactionsOperations` method allows you to retrieve Successful operations for a specific transaction on the Stellar blockchain. You can use this method to fetch the operations associated with a particular transaction. + +### Example use cases: + +1. **Transaction Analysis:** + Users can retrieve the operations related to a specific transaction for analysis and auditing purposes. + +2. **Transaction History:** + Developers can use this method to obtain the operations performed within a specific transaction. + +### Request Parameters + +The `getTransactionsOperations` method accepts the following optional parameters: + +- `transaction_hash` (string, required): + The hash of the transaction for which you want to retrieve operations. + +- `cursor` (string, optional): + An optional cursor to start listing operations from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of operations to return. The limit can range from 1 to 200. + +- `includeFailed` (boolean, optional): + An optional parameter to include failed operations. If set to true, failed operations will be included in the results. Defaults to false. + +- `join` (boolean, optional): + Set to transactions to include the transactions which created each of the operations in the response. + +### Response Object + +The `getTransactionsOperations` method returns an array of Successful operations related to the specified transaction. Each operation object contains information such as the operation type, source account, destination account, amount, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_links": { + "self": { + "href": "https://horizon.stellar.org/transactions/6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a/operations?cursor=&limit=10&order=asc" + }, + "next": { + "href": "https://horizon.stellar.org/transactions/6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a/operations?cursor=120133379185221636&limit=10&order=asc" + }, + "prev": { + "href": "https://horizon.stellar.org/transactions/6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a/operations?cursor=120133379185221633&limit=10&order=desc" + } + }, + "_embedded": { + "records": [ + { + "_links": { + "self": { + "href": "https://horizon.stellar.org/operations/120133379185221633" + }, + "transaction": { + "href": "https://horizon.stellar.org/transactions/6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a" + }, + "effects": { + "href": "https://horizon.stellar.org/operations/120133379185221633/effects" + }, + "succeeds": { + "href": "https://horizon.stellar.org/effects?order=desc&cursor=120133379185221633" + }, + "precedes": { + "href": "https://horizon.stellar.org/effects?order=asc&cursor=120133379185221633" + } + }, + "id": "120133379185221633", + "paging_token": "120133379185221633", + "transaction_successful": true, + "source_account": "GDJX67SFY2N73H72TWMKKBQP5UPBNKBNUMNE2IGFKNES43S4327X6DHG", + "type": "manage_buy_offer", + "type_i": 12, + "created_at": "2020-01-28T21:14:59Z", + "transaction_hash": "6b983a4e0dc3c04f4bd6b9037c55f70a09c434dfd01492be1077cf7ea68c2e4a", + "amount": "0.0000000", + "price": "0.0001000", + "price_r": { + "n": 1, + "d": 10000 + }, + "buying_asset_type": "native", + "selling_asset_type": "credit_alphanum4", + "selling_asset_code": "ETH", + "selling_asset_issuer": "GBDEVU63Y6NTHJQQZIKVTC23NWLQVP3WJ2RI2OTSJTNYOIGICST6DUXR", + "offer_id": 149983118 + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactions.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactions.md new file mode 100644 index 00000000..7432e5c8 --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-gettransactions.md @@ -0,0 +1,149 @@ +--- +title: "getTransactions" +slug: "rpc-stellar-gettransactions" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:06 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const params = { + cursor: "YOUR_CURSOR", + order: "asc", + limit: 10, + includeFailed: true, +}; + +// Get a list of transactions +const transactions = await tatum.rpc.getTransactions(params); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `getTransactions` method allows you to retrieve a list of transactions on the Stellar blockchain. You can use this method in streaming mode to listen for new transactions as they are added to the Stellar ledger. When used in streaming mode, Horizon will start at the earliest known transaction unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream transactions created since your request time. + +### Example use cases: + +1. **Transaction Monitoring:** + Developers and applications can use this method to monitor and track all transactions on the Stellar network in real-time. + +2. **Transaction Data Analysis:** + Users can retrieve a list of transactions for analysis, reporting, and auditing purposes. + +3. **Stream Transactions:** + You can use streaming mode to receive real-time updates of new transactions on the Stellar ledger. + +### Request Parameters + +The `getTransactions` method accepts the following optional parameters: + +- `cursor` (string, optional): + An optional cursor to start listing transactions from a specific point. + +- `order` (string, optional): + An optional parameter to specify the order of listing (asc or desc). If not provided, it defaults to 'asc'. + +- `limit` (number, optional): + An optional parameter to specify the maximum number of transactions to return. The limit can range from 1 to 200. + +- `includeFailed` (boolean, optional): + An optional parameter to include failed transactions. If set to true, failed transactions will be included in the results. Defaults to false. + +### Return Object + +The `getTransactions` method returns an array of transactions on the Stellar blockchain. Each transaction object contains information such as the transaction ID, source account, destination account, amount, fee, and more. + +(Note: The exact fields in the return object might vary based on the Stellar blockchain's implementation and version.) + +```json +{ + "value": { + "_links": { + "self": { + "href": "https://horizon.stellar.org/transactions?cursor=&limit=3&order=asc" + }, + "next": { + "href": "https://horizon.stellar.org/transactions?cursor=33736968114176&limit=3&order=asc" + }, + "prev": { + "href": "https://horizon.stellar.org/transactions?cursor=12884905984&limit=3&order=desc" + } + }, + "_embedded": { + "records": [ + { + "memo": "hello world", + "_links": { + "self": { + "href": "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889" + }, + "account": { + "href": "https://horizon.stellar.org/accounts/GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7" + }, + "ledger": { + "href": "https://horizon.stellar.org/ledgers/3" + }, + "operations": { + "href": "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889/operations{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://horizon.stellar.org/transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889/effects{?cursor,limit,order}", + "templated": true + }, + "precedes": { + "href": "https://horizon.stellar.org/transactions?order=asc&cursor=12884905984" + }, + "succeeds": { + "href": "https://horizon.stellar.org/transactions?order=desc&cursor=12884905984" + } + }, + "id": "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889", + "paging_token": "12884905984", + "successful": true, + "hash": "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889", + "ledger": 3, + "created_at": "2015-09-30T17:15:54Z", + "source_account": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7", + "source_account_sequence": "1", + "fee_charged": 300, + "max_fee": 300, + "operation_count": 3, + "envelope_xdr": "AAAAAAAGUcmKO5465JxTSLQOQljwk2SfqAJmZSG6JH6wtqpwhAAABLAAAAAAAAAABAAAAAAAAAAEAAAALaGVsbG8gd29ybGQAAAAAAwAAAAAAAAAAAAAAABbxCy3mLg3hiTqX4VUEEp60pFOrJNxYM1JtxXTwXhY2AAAAAAvrwgAAAAAAAAAAAQAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNgAAAAAN4Lazj4x61AAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABLaqcIQAAAEBKwqWy3TaOxoGnfm9eUjfTRBvPf34dvDA0Nf+B8z4zBob90UXtuCqmQqwMCyH+okOI3c05br3khkH0yP4kCwcE", + "result_xdr": "AAAAAAAAASwAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAFAAAAAAAAAAA=", + "result_meta_xdr": "AAAAAAAAAAMAAAACAAAAAAAAAAMAAAAAAAAAABbxCy3mLg3hiTqX4VUEEp60pFOrJNxYM1JtxXTwXhY2AAAAAAvrwgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAMAAAAAAAAAAAGUcmKO5465JxTSLQOQljwk2SfqAJmZSG6JH6wtqpwhDeC2s5t4PNQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAEAAAADAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQAAAAAL68IAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAMAAAADAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNgAAAAAL68IAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAAW8Qst5i4N4Yk6l+FVBBKetKRTqyTcWDNSbcV08F4WNg3gtrObeDzUAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAwAAAAAAAAAAAZRyYo7njrknFNItA5CWPCTZJ+oAmZlIbokfrC2qnCEAAAAAC+vCAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", + "fee_meta_xdr": "AAAAAgAAAAMAAAABAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQ3gtrOnZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAADAAAAAAAAAAABlHJijueOuScU0i0DkJY8JNkn6gCZmUhuiR+sLaqcIQ3gtrOnY/7UAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", + "memo_type": "text", + "signatures": [ + "SsKlst02jsaBp35vXlI300Qbz39+HbwwNDX/gfM+MwaG/dFF7bgqpkKsDAsh/qJDiN3NOW695IZB9Mj+JAsHBA==" + ] + } + ] + } + } +} +``` diff --git a/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-submittransaction.md b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-submittransaction.md new file mode 100644 index 00000000..44abe6ca --- /dev/null +++ b/v1.0/RPC Nodes/rpc-others/rpc-stellar/rpc-stellar-submittransaction.md @@ -0,0 +1,124 @@ +--- +title: "submitTransaction" +slug: "rpc-stellar-submittransaction" +excerpt: "Stellar RPC" +hidden: false +metadata: + description: "Stellar RPC" + image: [] + keywords: "stellar, rpc" + robots: "index" +createdAt: "Wed Mar 06 2024 10:35:44 GMT+0000 (Coordinated Universal Time)" +updatedAt: "Sat Apr 06 2024 13:09:02 GMT+0000 (Coordinated Universal Time)" +--- +[block:html] +{ + "html": "
\n
Archive Method
\n

Only on the full archive nodes. Complex queries might take longer and incur additional cost

\n
" +} +[/block] + + +### How to use it + +```typescript +// Import required libraries and modules from Tatum SDK +import { TatumSDK, Stellar, Network } from "@tatumio/tatum"; + +// Initialize the Tatum SDK for Stellar +const tatum = await TatumSDK.init({ network: Network.STELLAR }); + +// Define parameters (Replace placeholders with actual values and remove redundant) +const tx = "BASE64_ENCODED_TRANSACTION_XDR"; + +// Submit a transaction +const result = await tatum.rpc.submitTransaction(tx); + +// Always destroy the Tatum SDK instance when done to stop any background processes +await tatum.destroy(); +``` + +### Overview + +The `submitTransaction` method allows you to submit a transaction to the Stellar network. It takes a single, required parameter, which is the base64-encoded XDR of the transaction. If you submit a transaction that has already been included in a ledger, this endpoint will return the same response as would have been returned for the original transaction submission. This allows for safe resubmission of transactions in error scenarios, as highlighted in the error-handling guide. + +### Example use cases: + +1. **Transaction Submission:** + Developers and applications can use this method to submit transactions to the Stellar network. + +### Request Parameters + +The `submitTransaction` method accepts the following parameters: + +- `tx` (string, required): + The base64-encoded XDR of the transaction to be submitted. + +### Response Object + +The `submitTransaction` method returns the result of the transaction submission. The exact response object may vary based on the Stellar blockchain's implementation and version. + +```json +{ + "value": { + "memo": "Test Transaction", + "memo_bytes": "VGVzdCBUcmFuc2FjdGlvbg==", + "_links": { + "self": { + "href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124" + }, + "account": { + "href": "https://horizon-testnet.stellar.org/accounts/GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN" + }, + "ledger": { + "href": "https://horizon-testnet.stellar.org/ledgers/139575" + }, + "operations": { + "href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124/operations{?cursor,limit,order}", + "templated": true + }, + "effects": { + "href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124/effects{?cursor,limit,order}", + "templated": true + }, + "precedes": { + "href": "https://horizon-testnet.stellar.org/transactions?order=asc&cursor=599470060347392" + }, + "succeeds": { + "href": "https://horizon-testnet.stellar.org/transactions?order=desc&cursor=599470060347392" + }, + "transaction": { + "href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124" + } + }, + "id": "8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124", + "paging_token": "599470060347392", + "successful": true, + "hash": "8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124", + "ledger": 139575, + "created_at": "2021-03-25T21:14:11Z", + "source_account": "GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN", + "source_account_sequence": "599336916353025", + "fee_account": "GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN", + "fee_charged": "100", + "max_fee": "100", + "operation_count": 1, + "envelope_xdr": "AAAAAgAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAAGQAAiEYAAAAAQAAAAEAAAAAAAAAAAAAAABgXP3QAAAAAQAAABBUZXN0IFRyYW5zYWN0aW9uAAAAAQAAAAAAAAABAAAAAJBwQrbJ9AD0Ietf7ZQyREhv/XDOW0qoelt0hwlun5v9AAAAAAAAAAAF9eEAAAAAAAAAAAFun5v9AAAAQKdJnG8QRiv9xGp1Oq7ACv/xR2BnNqjfUHrGNua7m4tWbrun3+GmAj6ca3xz+4ZppWRTbvTUcCxvpbHERZ85QgY=", + "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=", + "result_meta_xdr": "AAAAAgAAAAIAAAADAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAABAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAA=", + "fee_meta_xdr": "AAAAAgAAAAMAAiEYAAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIdugAAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAiE3AAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIduecAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", + "memo_type": "text", + "max_fee": "100", + "operation_count": 1, + "envelope_xdr": "AAAAAgAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAAGQAAiEYAAAAAQAAAAEAAAAAAAAAAAAAAABgXP3QAAAAAQAAABBUZXN0IFRyYW5zYWN0aW9uAAAAAQAAAAAAAAABAAAAAJBwQrbJ9AD0Ietf7ZQyREhv/XDOW0qoelt0hwlun5v9AAAAAAAAAAAF9eEAAAAAAAAAAAFun5v9AAAAQKdJnG8QRiv9xGp1Oq7ACv/xR2BnNqjfUHrGNua7m4tWbrun3+GmAj6ca3xz+4ZppWRTbvTUcCxvpbHERZ85QgY=", + "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=", + "result_meta_xdr": "AAAAAgAAAAIAAAADAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAABAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAA=", + "fee_meta_xdr": "AAAAAgAAAAMAAiEYAAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIdugAAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAiE3AAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIduecAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==", + "memo_type": "text", + "signatures": [ + "p0mcbxBGK/3EanU6rsAK//FHYGc2qN9QesY25rubi1Zuu6ff4aYCPpxrfHP7hmmlZFNu9NRwLG+lscRFnzlCBg==" + ], + "valid_after": "1970-01-01T00:00:00Z", + "valid_before": "2021-03-25T21:17:04Z" + } +} +```