Skip to content

Commit c6a7ea4

Browse files
committed
linting and description fix
1 parent 549bdf7 commit c6a7ea4

File tree

3 files changed

+179
-177
lines changed

3 files changed

+179
-177
lines changed

src/pages/komodo-defi-framework/api/legacy/buy/index.mdx

+84-83
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ The `buy` method issues a buy request and attempts to match an order from the or
1414

1515
## Arguments
1616

17-
| Structure | Type | Description |
18-
| ----------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19-
| base | string | The name of the coin the user desires to receive |
20-
| rel | string | The name of the coin the user desires to sell |
21-
| price | various | The amount in `rel` the user wants per one unit of the `base` coin. Can be a numeric string, expressed using standard [RationalValue](/komodo-defi-framework/api/common_structures/#rational-value) or [FractionalValue](/komodo-defi-framework/api/common_structures/#fractional-value) objects. |
22-
| volume | various | The amount of coins the user is willing to receive of the `base` coin; the following values must be greater than or equal to the `min_trading_vol` of the corresponding coin: <ul><li>the argument `volume`</li><li>the product of the arguments `volume` and `price`</li></ul>. . Can be a numeric string, expressed using standard [RationalValue](/komodo-defi-framework/api/common_structures/#rational-value) or [FractionalValue](/komodo-defi-framework/api/common_structures/#fractional-value) objects. |
23-
| min\_volume | various (optional)| The amount of `base` coin that will be used as `min_volume` of `GoodTillCancelled` order after conversion to maker; the following values must be greater than or equal to the `min_trading_vol` of the corresponding coin: <ul><li>the argument `min_volume`</li><li>the product of the arguments `min_volume` and `price`</li></ul>. Can be a numeric string, expressed using standard [RationalValue](/komodo-defi-framework/api/common_structures/#rational-value) or [FractionalValue](/komodo-defi-framework/api/common_structures/#fractional-value) objects. |
24-
| match\_by | object | Optional. A standard [MatchBy](/komodo-defi-framework/api/common_structures/orders/#match-by) object, to filter to include only matches by pubkey or uuid. *Important:* This condition is not applied after a `GoodTillCancelled` order is converted to a `maker` request. |
25-
| order\_type | object | Optional. A standard [OrderType](/komodo-defi-framework/api/common_structures/orders/#order-type) object. |
26-
| base\_confs | number | Number of required blockchain confirmations for base coin atomic swap transaction; default to base coin configuration if not set |
27-
| base\_nota | boolean | Whether dPoW notarization is required for base coin atomic swap transaction; default to base coin configuration if not set |
28-
| rel\_confs | number | Number of required blockchain confirmations for rel coin atomic swap transaction; default to rel coin configuration if not set |
29-
| rel\_nota | boolean | Whether dPoW notarization is required for rel coin atomic swap transaction; default to rel coin configuration if not set |
30-
| save\_in\_history | boolean | Defaults to `true`. If set to `false` no order history will be saved (though order status will be temporarily stored while in progress). If `true`, each order's short record history is stored in a local SQLite database table, and when the order is cancelled or fully matched, it's history will be saved as a json file |
17+
| Structure | Type | Description |
18+
| ----------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19+
| base | string | The name of the coin the user desires to receive |
20+
| rel | string | The name of the coin the user desires to sell |
21+
| price | various | The amount in `rel` the user wants per one unit of the `base` coin. Can be a numeric string, expressed using standard [RationalValue](/komodo-defi-framework/api/common_structures/#rational-value) or [FractionalValue](/komodo-defi-framework/api/common_structures/#fractional-value) objects. |
22+
| volume | various | The amount of coins the user is willing to receive of the `base` coin; the following values must be greater than or equal to the `min_trading_vol` of the corresponding coin: <ul><li>the argument `volume`</li><li>the product of the arguments `volume` and `price`</li></ul>. . Can be a numeric string, expressed using standard [RationalValue](/komodo-defi-framework/api/common_structures/#rational-value) or [FractionalValue](/komodo-defi-framework/api/common_structures/#fractional-value) objects. |
23+
| min\_volume | various (optional) | The amount of `base` coin that will be used as `min_volume` of `GoodTillCancelled` order after conversion to maker; the following values must be greater than or equal to the `min_trading_vol` of the corresponding coin: <ul><li>the argument `min_volume`</li><li>the product of the arguments `min_volume` and `price`</li></ul>. Can be a numeric string, expressed using standard [RationalValue](/komodo-defi-framework/api/common_structures/#rational-value) or [FractionalValue](/komodo-defi-framework/api/common_structures/#fractional-value) objects. |
24+
| match\_by | object | Optional. A standard [MatchBy](/komodo-defi-framework/api/common_structures/orders/#match-by) object, to filter to include only matches by pubkey or uuid. *Important:* This condition is not applied after a `GoodTillCancelled` order is converted to a `maker` request. |
25+
| order\_type | object | Optional. A standard [OrderType](/komodo-defi-framework/api/common_structures/orders/#order-type) object. |
26+
| base\_confs | number | Number of required blockchain confirmations for base coin atomic swap transaction; default to base coin configuration if not set |
27+
| base\_nota | boolean | Whether dPoW notarization is required for base coin atomic swap transaction; default to base coin configuration if not set |
28+
| rel\_confs | number | Number of required blockchain confirmations for rel coin atomic swap transaction; default to rel coin configuration if not set |
29+
| rel\_nota | boolean | Whether dPoW notarization is required for rel coin atomic swap transaction; default to rel coin configuration if not set |
30+
| save\_in\_history | boolean | Defaults to `true`. If set to `false` no order history will be saved (though order status will be temporarily stored while in progress). If `true`, each order's short record history is stored in a local SQLite database table, and when the order is cancelled or fully matched, it's history will be saved as a json file |
3131

3232
## Response
3333

@@ -72,78 +72,79 @@ The `buy` method issues a buy request and attempts to match an order from the or
7272
```json
7373
{
7474
"result": {
75-
"base": "DOC",
76-
"rel": "MARTY",
77-
"base_amount": "2.4",
78-
"base_amount_rat": [
79-
[
80-
1,
81-
[
82-
12
83-
]
84-
],
85-
[
86-
1,
87-
[
88-
5
89-
]
90-
]
75+
"base": "DOC",
76+
"rel": "MARTY",
77+
"base_amount": "2.4",
78+
"base_amount_rat": [
79+
[
80+
1,
81+
[
82+
12
83+
]
9184
],
92-
"rel_amount": "2.64",
93-
"rel_amount_rat": [
94-
[
95-
1,
96-
[
97-
66
98-
]
99-
],
100-
[
101-
1,
102-
[
103-
25
104-
]
105-
]
85+
[
86+
1,
87+
[
88+
5
89+
]
90+
]
91+
],
92+
"rel_amount": "2.64",
93+
"rel_amount_rat": [
94+
[
95+
1,
96+
[
97+
66
98+
]
10699
],
107-
"action": "Buy",
108-
"uuid": "3d2286d1-1eef-487b-a07a-904f33034792",
109-
"method": "request",
110-
"sender_pubkey": "d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2",
111-
"dest_pub_key": "0000000000000000000000000000000000000000000000000000000000000000",
112-
"match_by": {
113-
"type": "Any"
114-
},
115-
"conf_settings": {
116-
"base_confs": 1,
117-
"base_nota": false,
118-
"rel_confs": 1,
119-
"rel_nota": false
120-
},
121-
"order_type": {
122-
"type": "GoodTillCancelled"
123-
},
124-
"min_volume": "0.0001",
125-
"min_volume_fraction": {
126-
"numer": "1",
127-
"denom": "10000"
128-
},
129-
"min_volume_rat": [
130-
[
131-
1,
132-
[
133-
1
134-
]
135-
],
136-
[
137-
1,
138-
[
139-
10000
140-
]
141-
]
100+
[
101+
1,
102+
[
103+
25
104+
]
105+
]
106+
],
107+
"action": "Buy",
108+
"uuid": "3d2286d1-1eef-487b-a07a-904f33034792",
109+
"method": "request",
110+
"sender_pubkey": "d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2",
111+
"dest_pub_key": "0000000000000000000000000000000000000000000000000000000000000000",
112+
"match_by": {
113+
"type": "Any"
114+
},
115+
"conf_settings": {
116+
"base_confs": 1,
117+
"base_nota": false,
118+
"rel_confs": 1,
119+
"rel_nota": false
120+
},
121+
"order_type": {
122+
"type": "GoodTillCancelled"
123+
},
124+
"min_volume": "0.0001",
125+
"min_volume_fraction": {
126+
"numer": "1",
127+
"denom": "10000"
128+
},
129+
"min_volume_rat": [
130+
[
131+
1,
132+
[
133+
1
134+
]
142135
],
143-
"base_orderbook_ticker": null,
144-
"rel_orderbook_ticker": null
145-
}
146-
}
136+
[
137+
1,
138+
[
139+
10000
140+
]
141+
]
142+
],
143+
"base_orderbook_ticker": null,
144+
"rel_orderbook_ticker": null
145+
},
146+
"userpass": "RPC_UserP@SSW0RD"
147+
}
147148
```
148149
</CodeGroup>
149150

0 commit comments

Comments
 (0)