diff --git a/content/tutorials/use-tokens/trade-in-the-decentralized-exchange.md b/content/tutorials/use-tokens/trade-in-the-decentralized-exchange.md index d5ec7ec809..af1579f030 100644 --- a/content/tutorials/use-tokens/trade-in-the-decentralized-exchange.md +++ b/content/tutorials/use-tokens/trade-in-the-decentralized-exchange.md @@ -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") }} + ### {{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") }} + **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") }} + 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") }} + 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()") }} + You can use this interface to test it out: