#BIP-0171 - Currency-pair information ## HTTP://api.cerise.tech/ A common interface for requesting currency exchange rate information from a server - BIP171 implementation [**Contact the developer**](mailto:stephane.traumat@gmail.com) **Version** 0.2 [**Terms of Service**](https://github.com/straumat/cerise/blob/master/LICENSE) [**BSD 2-Clause &quot;Simplified&quot; License**](https://github.com/straumat/cerise/blob/master/LICENSE) # APIs ## / ### 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 | successful operation | Array[<a href="#/definitions/CurrencyPairInformationResult">CurrencyPairInformationResult</a>]| # Definitions ## <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>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>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_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>