-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #354 from KomodoPlatform/enabled_coins_v2
- Loading branch information
Showing
8 changed files
with
106 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
src/pages/komodo-defi-framework/api/v20/get_enabled_coins/index.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
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 | ||
|
||
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 | | ||
| coins.ticker | string | the ticker of an activated coin | | ||
|
||
<Note> | ||
The \[get\_enabled\_coins v2.0] method does not return addresses, as it was designed for HD wallets, which generate addresses on the fly. | ||
If you need to get the addresses for coins and have not set `enable_hd` in your [MM2.json file](/komodo-defi-framework/setup/configure-mm2-json/), use the [v1 method](/komodo-defi-framework/api/legacy/get_enabled_coins/#get-enabled-coins). | ||
</Note> | ||
|
||
#### 📌 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters