#BIP-0171 - Currency-pair information [**Contact the developer**](mailto:contact@cerise.tech) **Version** 0.5 ## / ### GET <a id="getCurrencyPairInformation">Currency-pair information</a> #### Request ##### Parameters <table border="1"> <tr> <th>Name</th> <th>Located in</th> <th>Required</th> <th>Description</th> <th>Default</th> <th>Schema</th> </tr> <tr> <th>mode</th> <td>query</td> <td>yes</td> <td>Always &quot;info&quot; for this request.</td> <td> - </td> <td>string </td> </tr> <tr> <th>cp</th> <td>query</td> <td>yes</td> <td>Currency pair(s) for which information is requested.</td> <td> - </td> <td>Array[string] (multi)</td> </tr> </table> #### Response | Status Code | Reason | Response Model | |-------------|-------------|----------------| | 200 | Everything worked as expected. | Array[<a href="#/definitions/CurrencyPairInformationResult">CurrencyPairInformationResult</a>]| | 400 | The request was unacceptable, often due to missing a required parameter. | <a href="#/definitions/CeriseError">CeriseError</a>| | 401 | No valid authorization was provided. | <a href="#/definitions/CeriseError">CeriseError</a>| | 402 | The parameters were valid but the request failed. | <a href="#/definitions/CeriseError">CeriseError</a>| | 404 | The requested resource doesn&#x27;t exist. | <a href="#/definitions/CeriseError">CeriseError</a>| | 500 | Something went wrong on the server. | <a href="#/definitions/CeriseError">CeriseError</a>| # Definitions ## <a name="/definitions/CeriseError">CeriseError</a> <table border="1"> <tr> <th>name</th> <th>type</th> <th>required</th> <th>description</th> <th>example</th> </tr> <tr> <td>type</td> <td> string </td> <td>required</td> <td>The type of error returned. One of api_connection_error, api_error, authentication_error, invalid_request_error or rate_limit_error.</td> <td>invalid_request_error</td> </tr> <tr> <td>message</td> <td> string </td> <td>required</td> <td>A human-readable message providing more details about the error.</td> <td>Invalid request to currency-pair information</td> </tr> <tr> <td>errors</td> <td> array[<a href="#/definitions/CeriseErrorDetail">CeriseErrorDetail</a>] </td> <td>optional</td> <td>List of errors.</td> <td></td> </tr> </table> ## <a name="/definitions/CeriseErrorDetail">CeriseErrorDetail</a> <table border="1"> <tr> <th>name</th> <th>type</th> <th>required</th> <th>description</th> <th>example</th> </tr> <tr> <td>code</td> <td> string </td> <td>required</td> <td>Error code.</td> <td>currency_code_invalid</td> </tr> <tr> <td>message</td> <td> string </td> <td>required</td> <td>A human-readable message providing more details about the error.</td> <td>Invalid currency code : AAA</td> </tr> </table> ## <a name="/definitions/CurrencyPairInformationResult">CurrencyPairInformationResult</a> <table border="1"> <tr> <th>name</th> <th>type</th> <th>required</th> <th>description</th> <th>example</th> </tr> <tr> <td>cp</td> <td> string </td> <td>required</td> <td>The currency-pair token. Currency-pair tokens are arbitrary Strings no longer than 255 characters, which may include any ASCII RFC 3986 unreserved characters (ie, alphanumerics and the hyphen, underscore, period, and tilde symbols)</td> <td>XBTUSD-ver4</td> </tr> <tr> <td>quote</td> <td> string </td> <td>required</td> <td>The currency code for the quote currency</td> <td>USD</td> </tr> <tr> <td>base</td> <td> string </td> <td>required</td> <td>The currency code for the base currency</td> <td>XBT</td> </tr> <tr> <td>locale</td> <td> string </td> <td>optional</td> <td>If provided, a String with the applicable Unicode CLDR locale</td> <td>en_US</td> </tr> <tr> <td>desc</td> <td> string </td> <td>optional</td> <td>Optional description. For example, it could be "Based on Florida BTM prices." or any other short String that provides information useful to the user</td> <td>Smoothed averages</td> </tr> <tr> <td>longdesc</td> <td> string </td> <td>optional</td> <td>Optional description, but may be longer and include newlines.</td> <td>USD price quotes as compared to Bitcoin value\n\nRecommended for casual usage</td> </tr> <tr> <td>symbol</td> <td> array[array] </td> <td>optional</td> <td>An Array of prefix and suffix for the quote currency. Each may be either a fixed String, an Array of two Strings (negative and positive), or null. Any positive or negative symbols must be included in this prefix/suffix; it MUST NOT be implied otherwise.</td> <td>[[&quot;-$&quot;, &quot;$&quot;], null]</td> </tr> <tr> <td>digits</td> <td> string </td> <td>optional</td> <td>The type of digits to use for the quote currency's numbers. "arabic" should be used for common 0-9 digits.</td> <td>arabic</td> </tr> <tr> <td>grouping</td> <td> array[object] </td> <td>optional</td> <td>An Array alternating between Numbers representing a series of digits, and Strings used as delimiters. If terminated by a zero, the final grouping is to be repeated continually. For example, the common US locale thousands grouping would be [3, ",", 0]</td> <td>[3, &quot;,&quot;, 0]</td> </tr> <tr> <td>fraction_sep</td> <td> string </td> <td>optional</td> <td>A String to be placed between whole numbers and a fractional amount.</td> <td>.</td> </tr> <tr> <td>fraction_digits</td> <td> array[integer] </td> <td>optional</td> <td>Array of absolute minimum (even for whole numbers) number of fractional digits, minimum fractional digits when a fraction exists, and maximum number of fractional digits when absolute precision is not demanded (below which is to be rounded in an implementation-dependent manner).</td> <td>[0, 2, 2]</td> </tr> <tr> <td>minpoll</td> <td> integer (int32) </td> <td>optional</td> <td>A Number of seconds indicating a minimum time between polls to the server. Clients should be prudent about not polling too often, even if this number is low. </td> <td>300</td> </tr> <tr> <td>longpoll</td> <td> boolean </td> <td>optional</td> <td>If provided and true, indicates long polling is supported by the server.</td> <td>true</td> </tr> <tr> <td>history</td> <td> number (double) </td> <td>optional</td> <td>If provided, indicates the server has historical records going back no earlier than the POSIX timestamp provided as a value.</td> <td></td> </tr> <tr> <td>archive</td> <td> number (double) </td> <td>optional</td> <td>If provided, indicates the server no longer has current rates, and has no historical rates more recent than the POSIX timestamp provided as a value.</td> <td>1.33423244E8</td> </tr> <tr> <td>signature</td> <td> string </td> <td>optional</td> <td>May be used for Linked Data Signatures</td> <td></td> </tr> </table>