mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-03 01:55:51 +00:00
add python tabs to tutorial page
This commit is contained in:
@@ -77,6 +77,10 @@ _JavaScript_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/js/trade-in-the-dex.js", language="js", start_with="// Get credentials", end_before="// Define the proposed trade") }}
|
||||
|
||||
_Python_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/py/trade-in-the-dex.py", language="py", start_with="# Get credentials", end_before="# Define the proposed trade") }}
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
### {{n.next()}}. Look Up Offers
|
||||
@@ -93,6 +97,10 @@ _JavaScript_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/js/trade-in-the-dex.js", language="js", start_with="// Define the proposed trade", end_before="// Send OfferCreate") }}
|
||||
|
||||
_Python_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/py/trade-in-the-dex.py", language="py", start_with="# Define the proposed trade", end_before="# Send OfferCreate") }}
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
**Note:** Other users of the XRP Ledger can also make trades at any time, so this is only an estimate of what would happen if nothing else changes. The outcome of a transaction is not guaranteed until it is [final](finality-of-results.html).
|
||||
@@ -159,6 +167,10 @@ _JavaScript_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/js/trade-in-the-dex.js", language="js", start_with="// Send OfferCreate", end_before="// Check metadata") }}
|
||||
|
||||
_Python_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/py/trade-in-the-dex.py", language="py", start_with="# Send OfferCreate", end_before="# Check metadata") }}
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
You can use this interface to send the transaction specified by the amounts in the previous step:
|
||||
@@ -193,6 +205,10 @@ _JavaScript_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/js/trade-in-the-dex.js", language="js", start_with="// Check metadata", end_before="// Check balances") }}
|
||||
|
||||
_Python_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/py/trade-in-the-dex.py", language="py", start_with="# Check metadata", end_before="# Check balances") }}
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
You can use this interface to test it out:
|
||||
@@ -216,6 +232,10 @@ _JavaScript_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/js/trade-in-the-dex.js", language="js", start_with="// Check balances", end_before="client.disconnect()") }}
|
||||
|
||||
_Python_
|
||||
|
||||
{{ include_code("_code-samples/trade-in-the-decentralized-exchange/py/trade-in-the-dex.py", language="py", start_with="# Check balances", end_before="# End main()") }}
|
||||
|
||||
<!-- MULTICODE_BLOCK_END -->
|
||||
|
||||
You can use this interface to test it out:
|
||||
|
||||
Reference in New Issue
Block a user