SDEX Components
Openorders

Open Orders

The "OpenOrders" component provides a list of limit orders an account has submitted to the SDEX orderbook.

Features

  • Collects source secret key, signers public address, and removes signer.
  • Upon Submission, The removed signers weight and thresholds are set to 0.
  • Provides a straightforward way to remove signers from a multi-signature wallet.

Additional Resources

An account can create orders to buy or sell assets using the Manage Buy Offer, Manage Sell Offer, or Passive Order operations. The account must hold the asset it wants to exchange, and it must trust the issuer of the asset it is trying to buy.

Review the documentation on Orders below, Orders are executed on a price-time priority

C#

Install the PakanaRazorSDEX NuGet package via the NuGet Package Manager Console.

.Net8.0 or greater is required.

dotnet add package PakanaRazorSDEX --version 0.0.4
??

Stellar Horizon Dependency will install automatically

NuGet Package Implementation
<PakanaRazorSDEX.Component.OpenOrders/>
C#
@page "/RemoveSigner"
@rendermode InteractiveAuto
 
@using Microsoft.JSInterop
 
<h2>Remove Signer from Stellar Account</h2>
<div>
    <input type="text" id="accountSecretmine" placeholder="Enter account secret key">
    <input type="text" id="signerPublicKeymine" placeholder="Enter signer public key to remove">
    <button onclick="removeSigner()">Remove Signer</button>
</div>
 
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/stellar-sdk/11.2.2/stellar-sdk.js"></script>
<script src="your-file-path/removeSigner.js"></script>

Javascript

We've provided simple HTML and JavaScript that can be used in your project as partial-components or be customized and integrated into your existing codebase.

Stellar CDN
*Current Version as of 2024-24-02*
<script src="https://cdnjs.cloudflare.com/ajax/libs/stellar-sdk/11.2.2/stellar-sdk.js"></script>
JavaScript
 
<script>
    function removeSigner() {
 const accountSecret = document.getElementById('accountSecret').value;
    if (!accountSecret) {
        alert('Please enter a valid secret key.');
    return;
 }
    const signerPublicKey =
    document.getElementById('signerPublicKey').value;
    const StellarSdk = window.StellarSdk;
    const server = new StellarSdk.Horizon.Server('https://horizontestnet.stellar.org');
    const sourceKeys = StellarSdk.Keypair.fromSecret(accountSecret);
    server.loadAccount(sourceKeys.publicKey())
 .then(account => {
 const transaction = new StellarSdk.TransactionBuilder(account, {
        fee: StellarSdk.BASE_FEE,
    networkPassphrase: StellarSdk.Networks.TESTNET
 })
    .addOperation(StellarSdk.Operation.setOptions({
        signer: {
        ed25519PublicKey: signerPublicKey,
    weight: 0 // Setting the weight to 0 removes the
    signer
 }
 }))
    .setTimeout(180)
    .build();
    transaction.sign(sourceKeys);
    return server.submitTransaction(transaction);
 })
 .then(result => {
        console.log('Success! Results:', result);
    alert('Signer removed successfully!');
 })
 .catch(error => {
        console.error('Something went wrong!', error);
    alert('Failed to remove signer. Error: ' + error.message);
 });
 }
</script>
 
 
HTML
 
<body>
    <h2>Remove Signer from Stellar Account</h2>
    <div>
        <input type="text" id="accountSecret" placeholder="Enter account secret
         key">
        <input type="text" id="signerPublicKey" placeholder="Enter signer public key
         to remove">
        <button onclick="removeSigner()">Remove Signer</button>
    </div>
</body>