Conversion
GET/crypto/convert/:from/:to
Convert one symbol to another
Request
Path Parameters
from The symbol you would like to convert from.required
to The symbol you would like convert to.required
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
info
object
required
timestamp Timestamp of a tick. (integer)required
Possible values: > 0
rate Value of a tick. (number)required
Possible values: > 0
query
object
required
from The symbol you would like to convert from. (string)required
to The symbol you would like convert to. (string)required
amount The amount to be converted. (number)
Possible values: >= 1e-8
Default value: 10
precision Precision (integer)
Default value: 8
result Result of the conversion (number)required
{
"info": {
"timestamp": 1704882030,
"rate": 1.23456
},
"query": {
"from": "string",
"to": "string",
"amount": 10,
"precision": 8
},
"result": 0
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
msg Message (string)required
type Error Type (string)required
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
Loading...