Make the resolve API docs not obviously wrong (#604)
This commit is contained in:
parent
7fc1ec6bd2
commit
b0b8c6e98b
|
@ -526,8 +526,8 @@ For binary markets:
|
||||||
|
|
||||||
For free response markets:
|
For free response markets:
|
||||||
|
|
||||||
- `outcome`: Required. One of `MKT`, `CANCEL`, or a `number` indicating the Free Response outcome ID.
|
- `outcome`: Required. One of `MKT`, `CANCEL`, or a `number` indicating the answer index.
|
||||||
- `resolutions`: A map of from outcome => number to use as the weights for resolving in favor of multiple free response options. Can only be set with `MKT` outcome.
|
- `resolutions`: An array of `{ answer, pct }` objects to use as the weights for resolving in favor of multiple free response options. Can only be set with `MKT` outcome.
|
||||||
|
|
||||||
For numeric markets:
|
For numeric markets:
|
||||||
|
|
||||||
|
@ -538,33 +538,33 @@ Example request:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Resolve a binary market
|
# Resolve a binary market
|
||||||
$ curl https://manifold.markets/api/v0/market -X POST -H 'Content-Type: application/json' \
|
$ curl https://manifold.markets/api/v0/market/{marketId}/resolve -X POST \
|
||||||
-H 'Authorization: Key {...}'
|
-H 'Content-Type: application/json' \
|
||||||
--data-raw '{"contractId":"{...}", \
|
-H 'Authorization: Key {...}' \
|
||||||
"outcome":"YES"}'
|
--data-raw '{"outcome": "YES"}'
|
||||||
|
|
||||||
# Resolve a binary market with a specified probability
|
# Resolve a binary market with a specified probability
|
||||||
$ curl https://manifold.markets/api/v0/market -X POST -H 'Content-Type: application/json' \
|
$ curl https://manifold.markets/api/v0/market/{marketId}/resolve -X POST \
|
||||||
-H 'Authorization: Key {...}'
|
-H 'Content-Type: application/json' \
|
||||||
--data-raw '{"contractId":"{...}", \
|
-H 'Authorization: Key {...}' \
|
||||||
"outcome":"MKT",
|
--data-raw '{"outcome": "MKT", \
|
||||||
"probabilityInt": 75}'
|
"probabilityInt": 75}'
|
||||||
|
|
||||||
# Resolve a free response market with a single answer chosen
|
# Resolve a free response market with a single answer chosen
|
||||||
$ curl https://manifold.markets/api/v0/market -X POST -H 'Content-Type: application/json' \
|
$ curl https://manifold.markets/api/v0/market/{marketId}/resolve -X POST \
|
||||||
-H 'Authorization: Key {...}'
|
-H 'Content-Type: application/json' \
|
||||||
--data-raw '{"contractId":"{...}", \
|
-H 'Authorization: Key {...}' \
|
||||||
"outcome":"{...}"}'
|
--data-raw '{"outcome": 2}'
|
||||||
|
|
||||||
# Resolve a free response market with multiple answers chosen
|
# Resolve a free response market with multiple answers chosen
|
||||||
$ curl https://manifold.markets/api/v0/market -X POST -H 'Content-Type: application/json' \
|
$ curl https://manifold.markets/api/v0/market/{marketId}/resolve -X POST \
|
||||||
-H 'Authorization: Key {...}'
|
-H 'Content-Type: application/json' \
|
||||||
--data-raw '{"contractId":"{...}", \
|
-H 'Authorization: Key {...}' \
|
||||||
"outcome":"MKT",
|
--data-raw '{"outcome": "MKT", \
|
||||||
"resolutions": {
|
"resolutions": [ \
|
||||||
"{...}": 1,
|
{"answer": 0, "pct": 50}, \
|
||||||
"{...}": 2,
|
{"answer": 2, "pct": 50} \
|
||||||
}}'
|
]}'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
Loading…
Reference in New Issue
Block a user