VES: Cargando
EURO: Cargando
CNY: Cargando
RUB: Cargando
USD: Cargando
LTC: Cargando
DASH: Cargando

< Developers >

Here you can find files, documents and guidelines to carry out the developments related to Petro.
Example 1

Different cryptos
to Fiat

Example 2

Different cryptos
to PTR

INTRODUCTION
API PRICE

This is the query API for the different prices from cryptocurrencies to fiat and from the most popular cryptocurrencies to Petro (PTR). This API sends back the information, the available price in the API of the wanted cryptocurrency or fiat currency from its code in a JSON format. It will have daily updates (for fiat currency values at 7 a.m. local time in Venezuela).

You will have access to the value of Petro in 35 fiat currencies (according to BCV quotes, the table of the available currencies is attached) and 3 cryptocurrencies (BTC, LTC, DASH).

This API is absolutely free.

  • We do not guarantee accuracy of the displayed exchange rates.
  • You should always confirm the exchange rates before making any transaction that may be affected by changes in them.
  • Cryptocurrency types based on data provided by exchange rate APIs.
  • All types are shown for information purposes only and are subject to change without notice.
  • As the exchange rates for actual transactions may vary, we do not offer to enter into any transaction with any of the rates shown.
  • The rates shown are combined prices and are not intended for investment purposes.
  • Sunacrip is committed to have the API in full operation 24 hours a day, seven days a week, except when unexpected and external circumstances to its control affect the provision of this service.

PARAMETERS

PRICE API allows you to consult the different prices from cryptocurrency to fiat and from the most popular cryptocurrencies to Petro (PTR), described below:

URL:https://petroapp-price.petro.gob.ve/price/
Metodo:Post
Headers:Content-Type: application/json
Claves:coins[“acronimo”,.....] y fiats[“acronimo”,.....]
Body:
{
coins: [
  "BTC",
  "DASH",
  "LTC",
  "ETH"
 ],
fiats: [
  "USD",
  "ARS",
  "BRL",
  "BOB",
  "CAD",
  "COP",
  "CLP",
  "MXP",
  "NIO",
  "PEN",
  "DOP",
  "TTD",
  "UYU",
  "ANG",
  "CZK",
  "DKK"
 ]
}



API calls can handle multiple parameters. For example, if you request the price of multiple currencies, you can send an API call for all of them. The parameter delimiter is a comma (,), instead of making separate API calls for each currency.

Example 1: Different cryptos to fiat

Allows you to consult the price of different cryptocurrencies including Petro with available fiat currencies.

URL: https://petroapp-price.petro.gob.ve/price/

Request:

curl -X POST \
https://petroapp-price.petro.gob.ve/price/ \
-H 'Content-Type: application/json' \
-H 'Host: api-price.petro.dom' \
-d ' {
  coins: [
   "BTC",
   "DASH",
   "LTC",
   "ETH",
   "PTR"
  ],
  fiats: [
   "USD",
   "ARS",
   "BRL",
   "BOB",
   "CAD",
   "COP",
   "CLP",
   "MXP",
   "NIO",
   "PEN",
   "DOP",
   "TTD",
   "UYU",
   "ANG",
   "CZK",
   "DKK"
  ]
 } '



imagen-1

Response:

All response types are application / json, as follow:

{
  status: 200,
  success: true,
  data: {
   BTC: {
    USD: 11571.1,
    ARS: 543197.02,
    BRL: 45905,
    BOB: 5832216.46,
    CAD: 15277.2,
    COP: 36523374.46,
    CLP: 8248083.07,
    NIO: 5095515.44,
    PEN: 38671.93,
    DOP: 611119.48,
    TTD: 95909.15,
    UYU: 408957.37,
    CZK: 270581,
    DKK: 76674.84
   },
   DASH: {
    USD: 104.25,
    ARS: 4906.14,
    BRL: 412.09,
    BOB: 52332.97,
    CAD: 137.14,
    COP: 327870.33,
    CLP: 74010.74,
    NIO: 45722.49,
    PEN: 347.16,
    DOP: 5486.02,
    TTD: 860.98,
    UYU: 3671.21,
    CZK: 2429.01,
    DKK: 688.31
   },
   LTC: {
    USD: 89.08,
    ARS: 4209.87,
    BRL: 354.98,
    BOB: 44917.85,
    CAD: 117.68,
    COP: 281339.55,
    CLP: 63524.08,
    NIO: 39244.02,
    PEN: 297.89,
    DOP: 4707.45,
    TTD: 738.79,
    UYU: 3150.2,
    CZK: 2084.29,
    DKK: 590.63
   },
   ETH: {
    USD: 217.33,
    ARS: 10263.71,
    BRL: 862.1,
    BOB: 1567.65,
    CAD: 286.91,
    COP: 685908.97,
    CLP: 154248.97,
    NIO: 95693.78,
    PEN: 726.26,
    DOP: 11476.82,
    TTD: 1801.17,
    UYU: 7680.22,
    CZK: 5081.51,
    DKK: 1439.95
   },
   PTR: {
    USD: 59.73,
    DKK: 394.28,
    CZK: 1343.75,
    ANG: 111.86,
    UYU: 2101.2,
    TTD: 402.25,
    DOP: 3028.73,
    PEN: 196.31,
    NIO: 1978.9,
    MXP: 1139.56,
    CLP: 40538.75,
    COP: 191690.38,
    CAD: 78.41,
    BOB: 409.21,
    BRL: 228.18,
    ARS: 2519.08
   }
  },
  message: "Creado"
}



*The results will be shown in a matrix while the price for different cryptocurrencies is been consulted.

imagen-2

Note: Fiat keys have a maximum of 100 characters according to the parameters, otherwise it will throw the following error:

{
  status: 200,
  success: true,
  data: {
   Response: "Error",
   Message: "tsyms param is invalid. (tsyms length is higher than maxlength: 100)",
   HasWarning: false,
   Type: 2,
   RateLimit: {},
   Data: {},
   ParamWithError: "tsyms",
   PTR: {}
  },
  message: "Creado"
}



*the price returned for the requested cryptocurrency is shown in all the requested fiat currencies that are available for service.

Example 2: Other cryptos to PTR

Allows you to consult the price in Petros (PTR) of cryptocurrencies (BTC, DASH, LTC, ETH), indicating the values of Crypto-Petro and Petro-Crypto.

URL: https://petroapp-price.petro.gob.ve/price/PTR

Request:

curl -X POST \
https://petroapp-price.petro.gob.ve/price/PTR \
-H 'Content-Type: application/json' \
-d ' {
"coins":[
  "BTC",
  "DASH",
  "LTC",
  "ETH"
 ]
}'



imagen-3

Response:{
  status: 200,
  success: true,
  data: {
   BTC: {
    BTC: 197.98428923,
    PTR: 0.00505091
   },
   LTC: {
    LTC: 1.43725156,
    PTR: 0.69577242
   },
   DASH: {
    DASH: 1.7427598,
    PTR: 0.57380254
   },
   ETH: {
    ETH: 3.55385198,
    PTR: 0.28138482
   }
  }
}



*the returned price for the requested cryptocurrency is expressed in Petros (PTR)

imagen-4

ABBREVIATIONS

Fiat currencies available in service

ISO Code Currency Country
Bs Bolivar Venezuela
USD US dollar USA
ARS Argentine peso Argentina
BRL Brazilian real Brazil
BOB Boliviano Bolivia
CAD Canadian dollar Canadá
COP Colombian peso Colombia
CLP Chilean peso Chile
MXP Mexican peso México
NIO Nicaraguan córdoba Nicaragua
PEN Nuevo sol Perú
DOP Dominican peso Dominican Republic
TTD Trinidadian dollar Trinidad y Tobago
UYU Uruguayan peso Uruguay
ANG Netherlands Antillean guilder Curaçao
CZK Czech koruna Czech Republic
DKK Danish krone Denmark
NOK Norwegian krone Norway
GBP Pound sterling United Kingdom
SEK Swedish krona Sweden
CHF Swiss franc Switzerland
RUB Russian ruble Russia
KRW South Korean won South Korea
CNY Chinese yuan China
TWD New Taiwan dollar Taiwan
INR Indian rupee India
ILS Israeli new shekel Israel
JPY Japanese yen Japan
HKD Hong Kong dollar Hong Kong
CNH Renminbi Hong Kong
JOD Jordanian dinar Jordan
AUD Australian dollar Australia
CUC Cuban convertible peso Cuba
DEG D.E.G. D.E.G.
EUR EURO (EUR) Eurozone
TRY Turkish lira Turkey

Cryptocurrencies Available in Service

Code CRYPTOCURRENCIES
PTR Petro
BTC Bitcoin
DASH Dash
LTC Litecoin
ETH Ethereum

Terms and Conditions

1.- For the App

1.1.- Petro Price API is a free app for public use, available to any user who requires its download.

1.2.- Petro Price API allows you to see the equivalent value of Petro in 32 currencies and three bitcoins: Bitcoin (BTC), Litecoin (LTC) and Dash.

2.- Users

2.1.- Any natural or legal person, public or private, can be users and choose to download the Petro Price API.

2.2.- The Petro Price API does not require any type of registration by users for its use. Therefore, under any circumstance, users will not be asked for data or personal information for registration and use of this app.

3.- Free Service

3.1.- Downloading and using the Petro Price API is completely free.

3.2.- The service provided by the use of the Petro Price API does not entail any type of economic or monetary cost for users.

4.- Service Availability

4.1.- The service provided by the Petro Price API will be available 24 hours a day, seven days a week.

4.2.- The Petro Price API and the service provided, may be affected by connectivity and network access problems, without this implying functional failures in the internal processes of the app and the service provided.

4.3.- Users are aware and accept that the scenarios of connectivity failures are external to the operation and processes of the service that derives from the use of the Petro Price API.

4.4.- In any case, the Petro Price API will be kept in a state of constant update of the rates and values of the different currencies and cryptocurrencies to generate the results of the equivalence between the Petro and the 32 available currencies and between the Petro and the three cryptocurrencies. defined in paragraph 1.2.

5.- Rates and Values Updates

5.1.- Petro Price API will take as a reference to establish the equivalence between Petro and the 32 available currencies, the official rates published by the Central Bank of Venezuela and the National Superintendence of Cryptoassets and Related Activities (Sunacrip).

5.2.- Petro Price API will take as a reference to establish the equivalence between Petro and BTC, LTC or Dash, the official rate published by the Sunacrip of the source they consider reliable.

5.3.- Currency rates will be updated every day at seven in the morning, official time of the Bolivarian Republic of Venezuela.

5.4.- BTC, LTC and Dash rates and values will be updated in real time.

6.- Accuracy and Independence of Calculations

6.1.- Petro Price API users are aware and accept that the results shown in the process of calculation and transformation of the Petro equivalent to the different currencies and cryptocurrencies. It is an exact process that is adjusted to the specified values and according to the reference rates in paragraphs 5.1 and 5.2

6.2.- Users are aware that the reference rates and values that are shown as a result of using Petro Price API are exact according to the reference value used, however, they constitute reference values that cannot be taken as a single, exact and universally established value of the equivalence between the Petro and the 32 available currencies or between the Petro and the three available cryptocurrencies.

6.3.- Petro Price API users agree that the values and equivalencies provided as a result of using the app, constitute reference values, adjusted to official rates and updated in real time.

6.4.- Users agree that Petro Price API results do not constitute an official rate for the exchange and valuation of the equivalence between currencies and cryptocurrencies with each other.

6.5.- Users accept and assume their responsibility in any negotiation established with other person, natural or legal, public or private; using the reference values of the equivalences obtained with the use of the Petro Price API.

6.6.- User accepts that any profit or loss margin in the negotiations described in the previous paragraph, are their full and complete responsibility.

7.- Final Provisions

7.1.- Petro Price API is not responsible for the mistakes that users make when entering the information of requested equivalences of the currencies or cryptocurrencies through the app.

7.2.- Petro Price API is intellectual property registered, therefore, any use or copy of any kind without the respective authorization of its creators and developers, will imply a violation of national and international regulations and conventions on the protection of intellectual property.

7.3.- For all matters not specifically provided for in this document, regulations will be by current legal norms and national or international agreements that regulate the use of web apps.