summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2017-03-04 23:37:59 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2017-03-04 23:37:59 +0000
commit019d922851260704c460dbe21a312cc52e28d3c2 (patch)
treeaa9e26bab94182ffd55ab9c29fc46ce27a78372c
parent8eaad1803f85de7ae36bcd287648092c9daf9c2f (diff)
downloadbips-019d922851260704c460dbe21a312cc52e28d3c2.tar.xz
bip-xchgrate: Limit currency-pair token symbols, and give a little info with enumeration
-rw-r--r--bip-xchgrate.mediawiki12
1 files changed, 9 insertions, 3 deletions
diff --git a/bip-xchgrate.mediawiki b/bip-xchgrate.mediawiki
index 434f3ab..164091d 100644
--- a/bip-xchgrate.mediawiki
+++ b/bip-xchgrate.mediawiki
@@ -29,6 +29,8 @@ To be BIP <FIXME> compatible, servers MUST support at least one currency-pair co
All inquiries for bitcoin amounts MUST be specified in XBT, even if the presentation to the end user is in another unit.
(FIXME: or should this be satoshis?)
+Currency-pair tokens are arbitrary Strings no longer than 255 characters, which may include any ASCII [https://tools.ietf.org/html/rfc3986#section-2.3 RFC 3986 unreserved characters] (ie, alphanumerics and the hyphen, underscore, period, and tilde symbols).
+
Currency code(s) used herein are defined as such:
* All ISO 4217 codes are valid currency codes.
@@ -46,8 +48,12 @@ Parameters:
* ''alt'' - If provided, the server MAY limit the results to only currency-pairs describing currency rates compared to the given currency code(s).
* ''locale'' - If provided, the server MAY limit the results to only currency-pairs supporting the given locale(s).
-There is only one result, which is a JSON Array of Strings, each representing a supported currency-pair.
-These Strings are arbitrarily decided by the server.
+Each currency-pair will receive a separate result, a JSON Object, with the following information:
+
+* ''cp'' - The currency-pair token.
+* ''cc'' - The currency code for the primary currency.
+* ''alt'' - The currency code for the secondary currency.
+* ''desc'' - Optional description. For example, it could be "Based on Florida BTM prices." or any other short String that provides information useful to the user. SHOULD be shorter than 45 characters.
===Currency-pair information===
@@ -61,7 +67,7 @@ Each currency-pair will receive a separate result, a JSON Object, with the follo
* ''cp'' - The currency-pair token.
* ''cc'' - The currency code for the primary currency.
* ''alt'' - The currency code for the secondary currency.
-* ''desc'' - Optional description. For example, it could be "Based on Florida BTM prices." or any other short String that provides information useful to the user.
+* ''desc'' - Optional description. For example, it could be "Based on Florida BTM prices." or any other short String that provides information useful to the user. SHOULD be shorter than 45 characters.
* ''longdesc'' - Optional description, but may be longer and formatted using HTML.
* ''symbol'' - An Array of prefix and suffix for the primary 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.
* ''digits'' - The type of digits to use for the primary currency's numbers. "arabic" should be used for common 0-9 digits.