Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions source/includes/_auctionsrpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,107 @@ No parameters
<!-- MARKDOWN-AUTO-DOCS:END -->


## InjBurntEndpoint

Returns the total amount of INJ burnt in auctions.

**IP rate limit group:** `indexer`


> Request Example:

<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=https://github.com/InjectiveLabs/sdk-python/raw/master/examples/exchange_client/auctions_rpc/4_InjBurntEndpoint.py) -->
<!-- The below code snippet is automatically added from https://github.com/InjectiveLabs/sdk-python/raw/master/examples/exchange_client/auctions_rpc/4_InjBurntEndpoint.py -->
```py
import asyncio

from pyinjective.async_client import AsyncClient
from pyinjective.core.network import Network


async def main():
# Select network: testnet, mainnet, or local
network = Network.testnet()

# Initialize AsyncClient
client = AsyncClient(network)

try:
# Fetch INJ burnt amount
inj_burnt_response = await client.fetch_inj_burnt()
print("INJ Burnt Endpoint Response:")
print(inj_burnt_response)

except Exception as e:
print(f"Error fetching INJ burnt amount: {e}")


if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(main())
```
<!-- MARKDOWN-AUTO-DOCS:END -->

<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=https://github.com/InjectiveLabs/sdk-go/raw/master/examples/exchange/auction/4_InjBurntEndpoint/example.go) -->
<!-- The below code snippet is automatically added from https://github.com/InjectiveLabs/sdk-go/raw/master/examples/exchange/auction/4_InjBurntEndpoint/example.go -->
```go
package main

import (
"context"
"encoding/json"
"fmt"
"time"

"github.com/InjectiveLabs/sdk-go/client/common"
"github.com/InjectiveLabs/sdk-go/client/exchange"
)

func main() {
network := common.LoadNetwork("testnet", "lb")
exchangeClient, err := exchange.NewExchangeClient(network)
if err != nil {
panic(err)
}

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

// Fetch INJ burnt details
injBurntResponse, err := exchangeClient.FetchInjBurnt(ctx)
if err != nil {
fmt.Printf("Failed to fetch INJ burnt details: %v\n", err)
return
}

// Print JSON representation of the response
jsonResponse, err := json.MarshalIndent(injBurntResponse, "", " ")
if err != nil {
fmt.Printf("Failed to marshal response to JSON: %v\n", err)
return
}

fmt.Println("INJ Burnt Details:")
fmt.Println(string(jsonResponse))
}
```
<!-- MARKDOWN-AUTO-DOCS:END -->

No parameters

### Response Parameters
> Response Example:

``` json
{
"total_inj_burnt": "15336250729"
}
```

<!-- MARKDOWN-AUTO-DOCS:START (JSON_TO_HTML_TABLE:src=./source/json_tables/indexer/auction/injBurntEndpointResponse.json) -->
<table class="JSON-TO-HTML-TABLE"><thead><tr><th class="parameter-th">Parameter</th><th class="type-th">Type</th><th class="description-th">Description</th></tr></thead><tbody ><tr ><td class="parameter-td td_text">total_inj_burnt</td><td class="type-td td_text">Decimal</td><td class="description-td td_text">The total amount of INJ burnt in auctions</td></tr></tbody></table>
<!-- MARKDOWN-AUTO-DOCS:END -->


## StreamBids

Stream live updates for auction bids.
Expand Down
3 changes: 2 additions & 1 deletion source/includes/_binaryoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ func main() {
<tr ><td class="parameter-td td_text">min_quantity_tick_size</td><td class="type-td td_text">Decimal</td><td class="description-td td_text">Minimum tick size of the quantity required for orders in the market</td></tr>
<tr ><td class="parameter-td td_text">settlement_price</td><td class="type-td td_text">Decimal</td><td class="description-td td_text">The market's settlement price</td></tr>
<tr ><td class="parameter-td td_text">min_notional</td><td class="type-td td_text">Decimal</td><td class="description-td td_text">Minimum notional (in quote asset) required for orders in the market</td></tr>
<tr ><td class="parameter-td td_text">admin_permissions</td><td class="type-td td_text">Integer</td><td class="description-td td_text">Level of admin permissions (the permission number is a result of adding up all individual permissions numbers)</td></tr></tbody></table>
<tr ><td class="parameter-td td_text">admin_permissions</td><td class="type-td td_text">Integer</td><td class="description-td td_text">Level of admin permissions (the permission number is a result of adding up all individual permissions numbers)</td></tr>
<tr ><td class="parameter-td td_text">quote_decimals</td><td class="type-td td_text">Integer</td><td class="description-td td_text">Number of decimals used for the quote token</td></tr></tbody></table>
<!-- MARKDOWN-AUTO-DOCS:END -->

<br/>
Expand Down
Loading
Loading