mirror of
				https://github.com/XRPLF/xrpl-dev-portal.git
				synced 2025-11-04 03:45:49 +00:00 
			
		
		
		
	Merge pull request #3360 from XRPLF/consistent_tx_examples
Add mainnet AMMCreate and OracleSet transaction examples
This commit is contained in:
		@@ -19,21 +19,32 @@ Creates both an [AMM entry][] and a [special AccountRoot entry](../../ledger-dat
 | 
			
		||||
 | 
			
		||||
```json
 | 
			
		||||
{
 | 
			
		||||
    "Account" : "rJVUeRqDFNs2xqA7ncVE6ZoAhPUoaJJSQm",
 | 
			
		||||
    "Amount" : {
 | 
			
		||||
        "currency" : "TST",
 | 
			
		||||
        "issuer" : "rP9jPyP5kyvFRb6ZiRghAGw5u8SGAmU4bd",
 | 
			
		||||
        "value" : "25"
 | 
			
		||||
    },
 | 
			
		||||
    "Amount2" : "250000000",
 | 
			
		||||
    "Fee" : "2000000",
 | 
			
		||||
    "Flags" : 2147483648,
 | 
			
		||||
    "Sequence" : 6,
 | 
			
		||||
    "TradingFee" : 500,
 | 
			
		||||
    "TransactionType" : "AMMCreate"
 | 
			
		||||
  "Account": "r3qNwezAqKp2FRFteiFjhC4V1at4KePFx7",
 | 
			
		||||
  "Amount": {
 | 
			
		||||
    "currency": "SKY",
 | 
			
		||||
    "issuer": "rSKYachd4cqUgztsTr83mEKTAcNZG4Ez2",
 | 
			
		||||
    "value": "80"
 | 
			
		||||
  },
 | 
			
		||||
  "Amount2": "20000000",
 | 
			
		||||
  "Fee": "200000",
 | 
			
		||||
  "Flags": 2147483648,
 | 
			
		||||
  "LastLedgerSequence": 99502897,
 | 
			
		||||
  "Memos": [
 | 
			
		||||
    {
 | 
			
		||||
      "Memo": {
 | 
			
		||||
        "MemoData": "414D4D2063726561746520696E69746961746564207669612058506D61726B65742E636F6D"
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "Sequence": 94041760,
 | 
			
		||||
  "SourceTag": 20221212,
 | 
			
		||||
  "TradingFee": 1000,
 | 
			
		||||
  "TransactionType": "AMMCreate",
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
{% tx-example txid="E4CC45E28421618FFEB1920B8FE152EAAB70489BD9AD52FEF24D58389C011C5E" /%}
 | 
			
		||||
 | 
			
		||||
{% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%}
 | 
			
		||||
 | 
			
		||||
| Field        | JSON Type           | [Internal Type][] | Required? | Description |
 | 
			
		||||
 
 | 
			
		||||
@@ -16,27 +16,79 @@ Create or update a [price oracle](../../../../concepts/decentralized-storage/pri
 | 
			
		||||
 | 
			
		||||
```json
 | 
			
		||||
{
 | 
			
		||||
  "TransactionType": "OracleSet",
 | 
			
		||||
  "Account": "rNZ9m6AP9K7z3EVg6GhPMx36V4QmZKeWds",
 | 
			
		||||
  "OracleDocumentID": 34,
 | 
			
		||||
  "Provider": "70726F7669646572",
 | 
			
		||||
  "LastUpdateTime": 1724871860,
 | 
			
		||||
  "Account": "roosteri9aGNFRXZrJNYQKVBfxHiE5abg",
 | 
			
		||||
  "AssetClass": "63757272656E6379",
 | 
			
		||||
  "Fee": "12",
 | 
			
		||||
  "LastUpdateTime": 1760397040,
 | 
			
		||||
  "OracleDocumentID": 3,
 | 
			
		||||
  "PriceDataSeries": [
 | 
			
		||||
    {
 | 
			
		||||
      "PriceData": {
 | 
			
		||||
        "AssetPrice": "267e",
 | 
			
		||||
        "BaseAsset": "XRP",
 | 
			
		||||
        "QuoteAsset": "USD",
 | 
			
		||||
        "AssetPrice": 740,
 | 
			
		||||
        "QuoteAsset": "SAR",
 | 
			
		||||
        "Scale": 3
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "PriceData": {
 | 
			
		||||
        "AssetPrice": "214a",
 | 
			
		||||
        "BaseAsset": "XRP",
 | 
			
		||||
        "QuoteAsset": "THB",
 | 
			
		||||
        "Scale": 2
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "PriceData": {
 | 
			
		||||
        "AssetPrice": "1abc8",
 | 
			
		||||
        "BaseAsset": "XRP",
 | 
			
		||||
        "QuoteAsset": "TRY",
 | 
			
		||||
        "Scale": 3
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "PriceData": {
 | 
			
		||||
        "AssetPrice": "13b19",
 | 
			
		||||
        "BaseAsset": "XRP",
 | 
			
		||||
        "QuoteAsset": "TWD",
 | 
			
		||||
        "Scale": 3
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "PriceData": {
 | 
			
		||||
        "AssetPrice": "686e090",
 | 
			
		||||
        "BaseAsset": "XRP",
 | 
			
		||||
        "QuoteAsset": "UAH",
 | 
			
		||||
        "Scale": 6
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "PriceData": {
 | 
			
		||||
        "AssetPrice": "a34",
 | 
			
		||||
        "BaseAsset": "XRP",
 | 
			
		||||
        "QuoteAsset": "USD",
 | 
			
		||||
        "Scale": 3
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "PriceData": {
 | 
			
		||||
        "AssetPrice": "11d9",
 | 
			
		||||
        "BaseAsset": "XRP",
 | 
			
		||||
        "QuoteAsset": "ZAR",
 | 
			
		||||
        "Scale": 2
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
  ],
 | 
			
		||||
  "Provider": "7468726565787270",
 | 
			
		||||
  "Sequence": 95076881,
 | 
			
		||||
  "TransactionType": "OracleSet",
 | 
			
		||||
  "URI": "68747470733A2F2F6174746573746174696F6E2E74687265657872702E6465762F63757272656E63793A39393530323934303A39353037363838313A33"
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
{% tx-example txid="11449FDBDF40345F08B2E1537EA9590369B5A662CDEB3DB71F9A2CC04E1012C1" /%}
 | 
			
		||||
 | 
			
		||||
## OracleSet Fields
 | 
			
		||||
{% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%}
 | 
			
		||||
 | 
			
		||||
| Field              | JSON Type | Internal Type | Required? | Description |
 | 
			
		||||
|--------------------|-----------|---------------|-----------|-------------|
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user