Skip to content

Instantly share code, notes, and snippets.

@cdiaz
Created April 7, 2016 07:35
Show Gist options
  • Save cdiaz/b4da1cb546ab13a0e9e63212baf2aa80 to your computer and use it in GitHub Desktop.
Save cdiaz/b4da1cb546ab13a0e9e63212baf2aa80 to your computer and use it in GitHub Desktop.
Obtener la tasa de cambio representativa del mercado para Colombia con PHP
<?php
$date = date("Y-m-d");
try {
$soap = new soapclient("https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL", array(
'soap_version' => SOAP_1_1,
'trace' => 1,
"location" => "http://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService",
));
$response = $soap->queryTCRM(array('tcrmQueryAssociatedDate' => $date));
$response = $response->return;
if($response->success){
echo $response->value;
}
} catch(Exception $e){
echo $e->getMessage();
}
?>
@melimestiza
Copy link

Sabes como podría acceder a cualquier tasa de cambio no solo el dólar?

@sistematod
Copy link

Yo también hago la misma pregunta

@WilmerPSilva
Copy link

Agradecido, maestro!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment