Skip to content

Commit

Permalink
add v2 get_enabled_coins method
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Oct 16, 2024
1 parent 756da8b commit 6bd5347
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 1 deletion.
8 changes: 8 additions & 0 deletions filepathSlugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2816,6 +2816,14 @@
"token-protocol-parse-error-error",
"unexpected-token-protocol-error"
],
"src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx": [
"get-enabled-coins",
"parameters",
"response",
"examples",
"command",
"response-2"
],
"src/pages/komodo-defi-framework/api/v20/get_public_key/index.mdx": [
"get-public-key",
"arguments",
Expand Down
4 changes: 4 additions & 0 deletions src/data/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,10 @@
{
"title": "Wallet",
"links": [
{
"title": "get_enabled_coins",
"href": "/komodo-defi-framework/api/v20/get_enabled_coins/"
},
{
"title": "get_public_key",
"href": "/komodo-defi-framework/api/v20/get_public_key/"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/komodo-defi-framework/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods:
| | | [get\_channel\_details](/komodo-defi-framework/api/v20-dev/lightning/channels/#get-channel-details) |
| | | [get\_claimable\_balances](/komodo-defi-framework/api/v20-dev/lightning/channels/#get-claimable-balances) |
| | | [get\_current\_mtp](/komodo-defi-framework/api/v20-dev/get_current_mtp/#get-current-mtp) |
| [get\_enabled\_coins](/komodo-defi-framework/api/legacy/get_enabled_coins/#get-enabled-coins) | | |
| [get\_enabled\_coins](/komodo-defi-framework/api/legacy/get_enabled_coins/#get-enabled-coins) | [get\_enabled\_coins](/komodo-defi-framework/api/v20/get_enabled_coins/#get-enabled-coins) | |
| [get\_gossip\_mesh](/komodo-defi-framework/api/legacy/get_gossip_mesh/#get-gossip-mesh) | | |
| [get\_gossip\_peer\_topics](/komodo-defi-framework/api/legacy/get_gossip_peer_topics/#get-gossip-peer-topics) | | |
| [get\_gossip\_topic\_peers](/komodo-defi-framework/api/legacy/get_gossip_topic_peers/#get-gossip-topic-peers) | | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export const description = "The get_enabled_coins method returns data of coins t

The `get_enabled_coins` method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node.

<Note>
This function is deprecated. Please consider using [get\_enabled\_coins v2.0](/komodo-defi-framework/api/v20/get_enabled_coins/) instead.
</Note>

## Arguments

| Structure | Type | Description |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
export const title = "Komodo DeFi Framework Method: Get Enabled Coins";
export const description = "The get_enabled_coins method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node.";

# get\_enabled\_coins

**get\_enabled\_coins**

The `get_enabled_coins` method returns data of coins that are currently enabled on the user's Komodo DeFi Framework API node.

## Parameters

| Structure | Type | Description |
| --------- | ---- | ----------- |
| (none) | | |

#### Response

| Structure | Type | Description |
| -------------- | ---------------- | ------------------------------------------------ |
| coins | array of objects | A list of key value pairs for activated tickers |
| ticker | string | the ticker of an activated coin |

#### 📌 Examples

#### Command

<CodeGroup title="" tag="POST" label="get_enabled_coins" mm2MethodDecorate="true">
```json
{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "get_enabled_coins",
"params": {},
"id": 0
}
```
</CodeGroup>

<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
#### Response

```json
{
"mmrpc": "2.0",
"result": {
"coins": [
{
"ticker": "ETH"
},
{
"ticker": "PGX-PLG20"
},
{
"ticker": "ATOM-IBC_IRIS"
},
{
"ticker": "NFT_ETH"
},
{
"ticker": "KMD"
},
{
"ticker": "IRIS"
},
{
"ticker": "AAVE-PLG20"
},
{
"ticker": "MINDS-ERC20"
},
{
"ticker": "NFT_MATIC"
},
{
"ticker": "MATIC"
}
]
},
"id": 0
}
```
</CollapsibleSection>

0 comments on commit 6bd5347

Please sign in to comment.