<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PaulGWebster</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=PaulGWebster"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/PaulGWebster"/>
	<updated>2026-06-13T10:50:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31789</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31789"/>
		<updated>2012-10-14T15:42:45Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: merged winproxy-&amp;gt;safetynet&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
&lt;br /&gt;
== Definition of Terms ==&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
* Protocol: V0/V1 - Support for the MtGox HTTP protocol version 0 or version 1.&lt;br /&gt;
* Protocol: WebSocket - Support for the streaming websocket protocol.&lt;br /&gt;
* Adaptive caching - Allow the frameworks cache for trades and depth to be updated adaptively via the WebSocket stream.&lt;br /&gt;
* Non-Blocking - The framework uses a non blocking method of communication with the MtGox API, that is its possible to execute many simultaneous tasks in parallel. This is beneficial to large applications that may have to manage multiple trades very quickly.&lt;br /&gt;
* Object Orientated - The framework uses an object based programming style.&lt;br /&gt;
* Blocking - The framework uses a blocking style of communication with the MtGox API, this menas that for instance when you place an order you have to wait for the information to come back to you before you can proceed. This is often easier to use for small bots and tickers.&lt;br /&gt;
* Maintained - If the framework is knowingly maintained.&lt;br /&gt;
* COMPAT_Linux - The framework is compatible with: linux.&lt;br /&gt;
* COMPAT_WIN32 - The framework is compatible with: windows (32bit).&lt;br /&gt;
* COMPAT_WIN32 - The framework is compatible with: windows (64bit).&lt;br /&gt;
* COMPAT_BSD - The framework is compatible with: BSD.&lt;br /&gt;
* Language - The language the framework is based in and the minimum version required. (Example: Python32, Perl 5.10)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Frameworks ==&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Protocol: V1&lt;br /&gt;
* Protocol: WebSocket&lt;br /&gt;
* Safety caching &lt;br /&gt;
* Adaptive caching&lt;br /&gt;
* Non-Blocking&lt;br /&gt;
* Object Orientated&lt;br /&gt;
* Maintained&lt;br /&gt;
* COMPAT_Linux&lt;br /&gt;
* COMPAT_BSD&lt;br /&gt;
* Language: Perl 5.10+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Server::SafetyNet ===&lt;br /&gt;
A pure adaptive cache for MtGox; that will automatically keep track of all the Trade Histories and Depth queries and serve them its self instead of querying MtGox, so if your client is a bit spam happy and keeps getting dropped by MtGox for spam protection; you can run your own safety net server to get around it. You may also want to run a SafetyNet server if you want to run PoCo-Client-MtGox on windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/HTTP/v1&amp;diff=31775</id>
		<title>MtGox/API/HTTP/v1</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/HTTP/v1&amp;diff=31775"/>
		<updated>2012-10-13T12:55:45Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: small ntoe added to wallet history&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Note: All API methods require a valid User-Agent header.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== HTTP API version 1 methods ==&lt;br /&gt;
&lt;br /&gt;
=== public information ===&lt;br /&gt;
&lt;br /&gt;
==== Multi Currency Ticker ====&lt;br /&gt;
&lt;br /&gt;
 https://mtgox.com/api/1/BTCUSD/ticker&lt;br /&gt;
 https://mtgox.com/api/1/BTCEUR/ticker&lt;br /&gt;
&lt;br /&gt;
 returns the current ticker for the selected currency :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;result&amp;quot;:&amp;quot;success&amp;quot;,&lt;br /&gt;
&amp;quot;return&amp;quot;:&lt;br /&gt;
 {&lt;br /&gt;
 &amp;quot;high&amp;quot;: {&amp;quot;value&amp;quot;:&amp;quot;5.70653&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;570653&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.70653&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;low&amp;quot;: {&amp;quot;value&amp;quot;:&amp;quot;5.4145&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;541450&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.41450&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;avg&amp;quot;: {&amp;quot;value&amp;quot;:&amp;quot;5.561119626&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;556112&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.56112&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;vwap&amp;quot;: {&amp;quot;value&amp;quot;:&amp;quot;5.610480461&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;561048&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.61048&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;vol&amp;quot;:&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;value&amp;quot;:&amp;quot;55829.58960346&amp;quot;,&lt;br /&gt;
  &amp;quot;value_int&amp;quot;:&amp;quot;5582958960346&amp;quot;,&lt;br /&gt;
  &amp;quot;display&amp;quot;:&amp;quot;55,829.58960346\u00a0BTC&amp;quot;,&lt;br /&gt;
  &amp;quot;currency&amp;quot;:&amp;quot;BTC&amp;quot;&lt;br /&gt;
 },&lt;br /&gt;
 &amp;quot;last_all&amp;quot;:{&amp;quot;value&amp;quot;:&amp;quot;5.5594&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;555940&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.55940&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;last_local&amp;quot;:{&amp;quot;value&amp;quot;:&amp;quot;5.5594&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;555940&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.55940&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;last_orig&amp;quot;:{&amp;quot;value&amp;quot;:&amp;quot;5.5594&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;555940&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.55940&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;last&amp;quot;:{&amp;quot;value&amp;quot;:&amp;quot;5.5594&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;555940&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.55940&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;buy&amp;quot;:{&amp;quot;value&amp;quot;:&amp;quot;5.53587&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;553587&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.53587&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;},&lt;br /&gt;
 &amp;quot;sell&amp;quot;:{&amp;quot;value&amp;quot;:&amp;quot;5.56031&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;556031&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;$5.56031&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;USD&amp;quot;}&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;note about prices:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* last_local include only the last trade in the selected currency&lt;br /&gt;
* last_all   is the last trade in ANY currency, converted to your currency&lt;br /&gt;
* last_orig  include data of the original last trade ( currency,price in currency . . . ),&lt;br /&gt;
* last is always the same as last_all&lt;br /&gt;
&lt;br /&gt;
==== Multi Currency depth ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCPLN/depth?raw&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCAUD/depth?raw&lt;br /&gt;
&lt;br /&gt;
==== Multi currency trades ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCUSD/trades?raw&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCPLN/trades?raw&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCAUD/trades?raw&lt;br /&gt;
&lt;br /&gt;
to get only the trades since a given trade id, you can add the parameter since=&amp;lt;trade_id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCUSD/trades?since=0&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCEUR/trades?since=1316312781670700&lt;br /&gt;
&lt;br /&gt;
For multi currency,also returns the primary value,&amp;quot;Y&amp;quot; or &amp;quot;N&amp;quot;, the primary currency is always the buyers currency&lt;br /&gt;
&lt;br /&gt;
A trade can appear in more than one currency, to ignore duplicates, use only the trades having primary =Y&lt;br /&gt;
&lt;br /&gt;
Each trade is described by a JSON structure like the following: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;date&amp;quot;:1316312781,&lt;br /&gt;
  &amp;quot;price&amp;quot;:&amp;quot;3.5599&amp;quot;,&lt;br /&gt;
  &amp;quot;amount&amp;quot;:&amp;quot;3.6900096&amp;quot;,&lt;br /&gt;
  &amp;quot;price_int&amp;quot;:&amp;quot;355990&amp;quot;,&lt;br /&gt;
  &amp;quot;amount_int&amp;quot;:&amp;quot;369000960&amp;quot;,&lt;br /&gt;
  &amp;quot;tid&amp;quot;:&amp;quot;1316312781670700&amp;quot;,&lt;br /&gt;
  &amp;quot;price_currency&amp;quot;:&amp;quot;EUR&amp;quot;,&lt;br /&gt;
  &amp;quot;item&amp;quot;:&amp;quot;BTC&amp;quot;,&lt;br /&gt;
  &amp;quot;trade_type&amp;quot;:&amp;quot;bid&amp;quot;,&lt;br /&gt;
  &amp;quot;primary&amp;quot;:&amp;quot;Y&amp;quot;,&lt;br /&gt;
  &amp;quot;properties&amp;quot;:&amp;quot;limit,mixed_currency&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The meaning of each field is as follows:&lt;br /&gt;
:{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Value&lt;br /&gt;
|-&lt;br /&gt;
| amount || the traded amount in item (BTC), float, deprecated&lt;br /&gt;
|-&lt;br /&gt;
| amount_int || the traded amount * 1E8&lt;br /&gt;
|-&lt;br /&gt;
| date || unix timestamp of trade&lt;br /&gt;
|-&lt;br /&gt;
| item || What was this trade about&lt;br /&gt;
|-&lt;br /&gt;
| price || price per unit, float, deprecated&lt;br /&gt;
|-&lt;br /&gt;
| price_int || price in smallest unit as integer (5 decimals of USD, 3 in case of JPY)&lt;br /&gt;
|-&lt;br /&gt;
| price_currency || currency in which trade was completed&lt;br /&gt;
|-&lt;br /&gt;
| tid || Trade id (big integer, which is in fact trade timestamp in microseconds)&lt;br /&gt;
|-&lt;br /&gt;
| trade_type || Did this trade result from the execution of a bid or a ask?&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Cancelled Trades ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCUSD/cancelledtrades&lt;br /&gt;
&lt;br /&gt;
returns a list of all the cancelled trades this last month, list of trade ids in json format .&lt;br /&gt;
&lt;br /&gt;
==== Full Depth ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCUSD/fulldepth&lt;br /&gt;
&lt;br /&gt;
returns full depth&lt;br /&gt;
&lt;br /&gt;
WARNING : since this is a big download, there is a rate limit on how often you can get it, limit your requests to 5 / hour or you could be dropped / banned.&lt;br /&gt;
&lt;br /&gt;
==== transaction information  ====&lt;br /&gt;
https://mtgox.com/api/1/generic/bitcoin/tx_details?hash=4462c88079cc51972f1bdcb8a4240ee8757b0bb69df828ade051c95ced540fa0&lt;br /&gt;
&lt;br /&gt;
will return :&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 {&lt;br /&gt;
 &amp;quot;result&amp;quot;:&amp;quot;success&amp;quot;,&lt;br /&gt;
 &amp;quot;return&amp;quot;:&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;hash&amp;quot;:&amp;quot;4462c88079cc51972f1bdcb8a4240ee8757b0bb69df828ade051c95ced540fa0&amp;quot;,&lt;br /&gt;
  &amp;quot;blocks&amp;quot;:[&amp;quot;000000000000076fa606a7b67c131afc87d24d34114be2863cf24ca3d48139e7&amp;quot;],&lt;br /&gt;
  &amp;quot;version&amp;quot;:&amp;quot;1&amp;quot;,&lt;br /&gt;
  &amp;quot;size&amp;quot;:&amp;quot;1158&amp;quot;,&lt;br /&gt;
  &amp;quot;in&amp;quot;:&lt;br /&gt;
  [{&lt;br /&gt;
   &amp;quot;n&amp;quot;:&amp;quot;0&amp;quot;,&lt;br /&gt;
   &amp;quot;prev_out_hash&amp;quot;:&amp;quot;4578576f49418e69da6d7a1166168bb80a94682f21cca518b6c2451bc64bf858&amp;quot;,&lt;br /&gt;
   &amp;quot;prev_out_n&amp;quot;:&amp;quot;1&amp;quot;,&lt;br /&gt;
   &amp;quot;coinbase&amp;quot;:null,&lt;br /&gt;
   &amp;quot;scriptsig&amp;quot;:&amp;quot;304402201d7eaf891bcda16ea2979694c02e590fea8fc43dc092ee60e5fb2dd756bcb19502205c5be31b772029700d0a43d499932e9c321af1cfbc8745fba6dbbe48fa79bbb501 043a264aac55e23f83b29ac7e7a914584d2aa6c2eb08ea05405f5efc38473183ca4fc075f8144bb78698df1a5be6f4057f1bccc9e1217a5658946bcc4d4f6972c3&amp;quot;,&lt;br /&gt;
   &amp;quot;addr&amp;quot;:&amp;quot;46f740cb9c737111ec91ec235f6877055be7175e&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;n&amp;quot;:&amp;quot;1&amp;quot;,&lt;br /&gt;
   &amp;quot;prev_out_hash&amp;quot;:&amp;quot;4feea511029896ff4c31132346a79594fcd0c4e60aab2fa4f527e1395d375488&amp;quot;,&lt;br /&gt;
   &amp;quot;prev_out_n&amp;quot;:&amp;quot;0&amp;quot;,&lt;br /&gt;
   &amp;quot;coinbase&amp;quot;:null,&lt;br /&gt;
   &amp;quot;scriptsig&amp;quot;:&amp;quot;3046022100f3bc0445f629e4e896ced23013d89ba6e6488a6ec21c47df608aaf6d6d212fbb022100d321c4c7f5f33900b8c0efba8ff58a3541e621588f402e167f51968b6ee0bbf201 042157f97a8a78caf6315dbd6d9267b9edd9c1c37cdb211f2bc03703a28eeebaf274efdcff4ef3e3ef4a6b7ccb5d8c17acba941d1a5669c3299f22a0e78e702fdb&amp;quot;,&amp;quot;addr&amp;quot;:&amp;quot;7b0a72820f6e92ccc384dbdecb5584d855ce9416&amp;quot;},&lt;br /&gt;
    &lt;br /&gt;
  {&lt;br /&gt;
 &amp;quot;n&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;prev_out_hash&amp;quot;:&amp;quot;9adadb88c3075afdce1216b35d27fd5cac9736ce3977778999f9a85105d2ea8f&amp;quot;,&amp;quot;prev_out_n&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;coinbase&amp;quot;:null,&amp;quot;scriptsig&amp;quot;:&amp;quot;3046022100d63237cca9bf2200c6aa255834e06f9dc5e4e20f1ea7e6678119bb0e4a5a109f022100db37ec795336509fb3a16d1acebfe08523d95e177284149614a6d3384286b27c01 04b16b41dab16cfbf59f1713559795440b98b384dc01656ebaceeec8f6d1463802cb474062b2b8c1de53ab1fe65be0f6213dd61519044e9c1f50291b915fc7fc6e&amp;quot;,&amp;quot;addr&amp;quot;:&amp;quot;2ed7c49f080e9898737276ad802e2067a1d06ab7&amp;quot;},&lt;br /&gt;
   {&lt;br /&gt;
 &amp;quot;n&amp;quot;:&amp;quot;3&amp;quot;,&amp;quot;prev_out_hash&amp;quot;:&amp;quot;0e2ed4e4db87ddc9cb54ab3cdcae59762293815d3093c238e42d33248b39e19d&amp;quot;,&amp;quot;prev_out_n&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;coinbase&amp;quot;:null,&amp;quot;scriptsig&amp;quot;:&amp;quot;3045022100ab501414e7643cc1a78645f544cbcf6411e71e0c21953cd51f7f9933a50538a002201b4c9bac60aa19d659d0686d45bf06c4928c4446269692d88722f57624cdaf1401 048e1e4862c6fee7293f6c7be43a72a375e68395398e4d5da3db06199a35fc46cf51b87f3c6b87caeb81181d630706e23b5679ae8b96ca36701282ae5b49dd99c9&amp;quot;,&amp;quot;addr&amp;quot;:&amp;quot;c74d2e95aeb037297c7b6a232d78c715fa1ab826&amp;quot;},&lt;br /&gt;
   {&lt;br /&gt;
 &amp;quot;n&amp;quot;:&amp;quot;4&amp;quot;,&amp;quot;prev_out_hash&amp;quot;:&amp;quot;93c912462daa2a52e108e3424596d56fe2a136d6707a65b6423dee229e317ea1&amp;quot;,&amp;quot;prev_out_n&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;coinbase&amp;quot;:null,&amp;quot;scriptsig&amp;quot;:&amp;quot;3045022100fe782441b8788ed9297c8fea735701ae0a77081fc748ceee8cde945107f64967022014d51d5bc8d8138b97a657eda6d03ba998810e3e941988da90b82f6d24d8471e01 045f53cf2dbdb3213084efa69ac1dfcd8d97be8073a8b8104feb000513aa048b653f400d23314fc090456078f46a0fc9daabdee57f1ef14c2111b9ddc35255189a&amp;quot;,&amp;quot;addr&amp;quot;:&amp;quot;958bba83ac42ebf055c1724b25bfe5c698abbb51&amp;quot;},&lt;br /&gt;
   {&lt;br /&gt;
    &amp;quot;n&amp;quot;:&amp;quot;5&amp;quot;,&amp;quot;prev_out_hash&amp;quot;:&amp;quot;44a1b493ef6176cced4c02fb97a227b98e5bea0616d9cdd6005bcd6905d667f3&amp;quot;,&amp;quot;prev_out_n&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;coinbase&amp;quot;:null,&amp;quot;scriptsig&amp;quot;:&amp;quot;30440220132484ad901567d2c52c0b4f3be5263d1d8ed6e76be1398d2bb7c2a1aec5f748022033b907afa05eb075dee9993b8a05c9e40c69e53d65a06cc8a975ff4c4407141e01 04bd5d7feb1884efdccbe8feb8fa9ff57d56272ac5f667bc59cb07a232fbbd9cbabdf54b6bb6ca4c77e0de22cb0f896fa6183e53381861641049f0edee2d64cfe5&amp;quot;,&amp;quot;addr&amp;quot;:&amp;quot;3784c102bbfd34cc7fb6e12c51b5c6177592f267&amp;quot;}],&lt;br /&gt;
  &amp;quot;out&amp;quot;:[{&amp;quot;n&amp;quot;:&amp;quot;0&amp;quot;,&lt;br /&gt;
  &amp;quot;value&amp;quot;:&lt;br /&gt;
   {&amp;quot;value&amp;quot;:&amp;quot;0.01000712&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;1000712&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;0.01000712\u00a0BTC&amp;quot;,&amp;quot;display_short&amp;quot;:&amp;quot;0.01\u00a0BTC&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;BTC&amp;quot;},&amp;quot;script&amp;quot;:&amp;quot;OP_DUP OP_HASH160 6427f36ed6e5a0cb526a0b0bef1335992326e9a9 OP_EQUALVERIFY OP_CHECKSIG&amp;quot;,&amp;quot;addr&amp;quot;:&amp;quot;6427f36ed6e5a0cb526a0b0bef1335992326e9a9&amp;quot;,&amp;quot;claimed&amp;quot;:&amp;quot;N&amp;quot;},{&amp;quot;n&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;value&amp;quot;:{&amp;quot;value&amp;quot;:&amp;quot;3.31674208&amp;quot;,&amp;quot;value_int&amp;quot;:&amp;quot;331674208&amp;quot;,&amp;quot;display&amp;quot;:&amp;quot;3.31674208\u00a0BTC&amp;quot;,&amp;quot;display_short&amp;quot;:&amp;quot;3.32\u00a0BTC&amp;quot;,&amp;quot;currency&amp;quot;:&amp;quot;BTC&amp;quot;},&amp;quot;script&amp;quot;:&amp;quot;OP_DUP OP_HASH160 1f27d1fc284143729944ab89823111d2bb63dc46 OP_EQUALVERIFY OP_CHECKSIG&amp;quot;,&amp;quot;addr&amp;quot;:&amp;quot;1f27d1fc284143729944ab89823111d2bb63dc46&amp;quot;,&amp;quot;claimed&amp;quot;:&amp;quot;N&amp;quot;}]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== block information ====&lt;br /&gt;
block information can be accessed by depth ( the block number ) :&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/bitcoin/block_list_tx?depth=188111&lt;br /&gt;
&lt;br /&gt;
or by hash :&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/bitcoin/block_list_tx?hash=000000000000076fa606a7b67c131afc87d24d34114be2863cf24ca3d48139e7&lt;br /&gt;
&lt;br /&gt;
both will return ( for block 188111 ) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;result&amp;quot;:&amp;quot;success&amp;quot;,&lt;br /&gt;
&amp;quot;return&amp;quot;:&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;info&amp;quot;:  &lt;br /&gt;
  {&lt;br /&gt;
   &amp;quot;hash&amp;quot;:&amp;quot;000000000000076fa606a7b67c131afc87d24d34114be2863cf24ca3d48139e7&amp;quot;,&lt;br /&gt;
   &amp;quot;parent&amp;quot;:&amp;quot;00000000000005adbcc9846f9f3542f9349b19a3c8a8f8149a830e8d748b0c92&amp;quot;,&lt;br /&gt;
   &amp;quot;depth&amp;quot;:&amp;quot;188111&amp;quot;,&lt;br /&gt;
   &amp;quot;mrkl_root&amp;quot;:&amp;quot;772b7dcc99c98a9d77e40e2ea300ba492254dea5439599f666c77bd5be1f3b4b&amp;quot;,&lt;br /&gt;
   &amp;quot;stamp&amp;quot;:&amp;quot;2012-07-08 12:03:12&amp;quot;,&lt;br /&gt;
   &amp;quot;size&amp;quot;:&amp;quot;76898&amp;quot;,&lt;br /&gt;
   &amp;quot;status&amp;quot;:&amp;quot;confirmed&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;txs&amp;quot;:[&amp;quot;020d258be19e6b399301acca1857ceb13adf643edbc660942d7eacc3290bdf55&amp;quot;,&amp;quot;0575fb1c09f86de21bdb00bb1423053e5ee667158ad50aa0043e82bdb3d21a1e&amp;quot;,&amp;quot;07830422f821fcd63e316411c883486161f15154ba27b4fffbd934fe02423020&amp;quot;,&amp;quot;07a6cdf84e5b5aec5f3ec968a36a469e2923237254c31adf8cc895f4d47dbd0c&amp;quot;,&amp;quot;0af35c993e0094010a73d48bded49ea1c7f5d26a1d80fb1ddd2fada39f725656&amp;quot;,&amp;quot;0b5a4340a8daa28832c4ea7baa463b896fe954bca50bcfaa2671947725c103bb&amp;quot;,&amp;quot;0c5adc9fb24a3daa80fe0e2ed6c6b35ee0cb70e3aa6da42276e04fd2132ee4a3&amp;quot;,&amp;quot;0d28cea45a0a90ac105777d1d53318d23be489416aded7bcc1c92ed2f7426358&amp;quot;,&amp;quot;0f05493623804d9ad4501521c893fb186cbb03e41962bbd42a10bf6c89f60026&amp;quot;,&amp;quot;0f627402384a9c88ec878b6d7e3866f88d8c91295c7a3f595a50f32af3a962e9&amp;quot;,&amp;quot;100f488d2822b1e50ef6b7a885fc576a610b2aa5d36c660c6b000555f5edb182&amp;quot;,&amp;quot;12d1cdcd17cfbccfd5184543c9edc5a18c3add089c76afa33c0da72001fcd2ea&amp;quot;,&amp;quot;144516c54e56e3c9a049995fd402dd4749eb7bf4276c247c598f67ea126c1ef0&amp;quot;,&amp;quot;158be63da6a97dcb7ac2286ae148ba0bbee62d4eb3be9423e0de84337c67cef1&amp;quot;,&amp;quot;175a4c4708a6237bdde8cc355487c1b85f61915d1336fb9ec1216946ed949efe&amp;quot;,&amp;quot;180a9901550e68c552fab07b23788bf424636ef899a73313c9dde8e00757acd9&amp;quot;,&amp;quot;186d0632a342d20e97a612e2ef6c60b74af278678e2221a5c043bb8bac683f73&amp;quot;,&amp;quot;19cf092b8657d0da33ef97c628469bfa0e87f564327629311881e8ef4cbe203c&amp;quot;,&amp;quot;21a79eeaab53234b1017689fcf13894154d3a9083d10feeec9096b2bd5135649&amp;quot;,&amp;quot;222e59465dae7866897b9a750cddb3924e775637944d3ec6dd1cd0f81bd9f36b&amp;quot;,&amp;quot;23e28db3cb8dc658d010eb7b3ed9f4ac0ae3be4049bad0d557c2a7446954d185&amp;quot;,&amp;quot;2426cb2d1fd6958c1830f98aa54bd9ee86fd3325cb13b1e9aeeb2901f481b38f&amp;quot;,&amp;quot;2528e80141db0f5a09f6d8ded3ba06427476256a70442a7df51fe3c2686bef64&amp;quot;,&amp;quot;256e754aa2829469cf575b121eb4abb7f6a1f0aeee6f221bfd14a5e0b0ca9baf&amp;quot;,&amp;quot;25fd783b5cdcb1e1769092a007103556bc3d5d419b5d5ba9ef6e7400a5e0caa7&amp;quot;,&amp;quot;268fa8738fe708161071624d3143475a7a26f7ccf8dd031c91861a3dd59d3eee&amp;quot;,&amp;quot;2801207fb1b50f1d60324b7a790da36c244875de7b0329fe1be53439e74d9553&amp;quot;,&amp;quot;2826f91a4664031f5ed7239bddc11fe746b63e1c5d70bbe043ffb62e966a2c01&amp;quot;,&amp;quot;28d4fcec098886db460d300d9a62be49c31ddbd1cdaa203a5fbdf8021eba22b6&amp;quot;,&amp;quot;2ada3f324802d7ad3dfa7d5ff24e888c3919cb8e7ba1050f59cc814ccc6c7f41&amp;quot;,&amp;quot;2cdce29d3ef98062d36e63d150e203737f1374f43e8a1b36eea08286450e5e24&amp;quot;,&amp;quot;2ce5579a4c205761779668232c685eb0c0974f0328daa073bafec2119afba906&amp;quot;,&amp;quot;2d1928299d04653351d2358885e51a981f227d9ac8eaae34437b63eff8f4b28c&amp;quot;,&amp;quot;2e5686a497efdda63de8c5aa23fd349f3004a31ccebc6b3954de06669b3dfe9c&amp;quot;,&amp;quot;2ecc8f682cb7e65802072bf311cdb9f87e25cf34ab3f0f475c16169040b3c654&amp;quot;,&amp;quot;335ab9791c80ab80ccbf55e6829ad3c67a6b48426769b9bd7b3d866233ad912b&amp;quot;,&amp;quot;34bf38fb8bb1e74d1570e4e357bf2c9af3956917bf3f49ee3a5a9bd9e89e174c&amp;quot;,&amp;quot;351835329ddecfd75c74fd82b207a6f1481394321b3c3613e71dad74654a59ee&amp;quot;,&amp;quot;38f67149f684713e8271b2f709c125c365cc0ae97c740d0e4a07822f71f3b640&amp;quot;,&amp;quot;39ddb42041f0ba3c7d87c2d5e74a633a1907f188b57569b2641c77fed674fe0a&amp;quot;,&amp;quot;3bdb7e7e5d8b7b4dc37fb961272819eeee0da9854657318503be4397567497c4&amp;quot;,&amp;quot;42d2e9a1a1650d58c21ebcb14eef6da5b248b43c96e1bca816baee4c73978650&amp;quot;,&amp;quot;42dba17d47c259559dc9a5a110457196ccae97447f2b9e6056fd96e471e09715&amp;quot;,&amp;quot;43a262b3cc7b2899b166ddf06d37fd4600b2348342514d8646a76c454b4772d0&amp;quot;,&amp;quot;4462c88079cc51972f1bdcb8a4240ee8757b0bb69df828ade051c95ced540fa0&amp;quot;,&amp;quot;44adb50a8c3096a079c5fef9dfaae479b2f2804e09106097d480a8c1b0672da1&amp;quot;,&amp;quot;44b4dce02cbd628e8f88bf7ca36f650db866b16c5a79b3cb6f6b24bcffb1c089&amp;quot;,&amp;quot;489ef413e51bcbd23a4134c366f2537d99ea81913af43627dcab4ccfd611d1df&amp;quot;,&amp;quot;49d2a512f63481a42ad30a1b3845fc2929296945519c0998dad4fa361064765a&amp;quot;,&amp;quot;4d5372c14355d789decb0e100fb05e86f6b854d0187815b60a1b37de41ca245a&amp;quot;,&amp;quot;4db9e6cc810918143fba3dfe8cc3030847b8297775dee7540ca03fbb0c8788c0&amp;quot;,&amp;quot;531bfa06d7164dc5cb971e3fe90aefd61c188a5d292350a2cfc12cd8bac760f6&amp;quot;,&amp;quot;553341c3683a9ccabe10fbb65334a694bab2469fa444570e51d81b7d416414f8&amp;quot;,&amp;quot;5592b28d4a6f652fce290e1502a6204ad501ec5759438c59209f29bd9e80f972&amp;quot;,&amp;quot;573b1dee0b00b1936d8e8b4f1f45e47c246d7be09b0573281bdbb0b71035841e&amp;quot;,&amp;quot;5767fe6251014d97a2f14e1226ae08b11065f78b7f52a390bda3eb87cf63e9d5&amp;quot;,&amp;quot;588c8e0d458ee5516468d4f0f68711757bd4e291e6456be8e3fde1fa9c6e72c9&amp;quot;,&amp;quot;59f3d51b41f346c08fb73be2a540ebc2aeffb2220da5c2e5d927b74a5249c907&amp;quot;,&amp;quot;59fb156e2e6b901524a7b7fe906db455f014deb361096db937db5be952490b36&amp;quot;,&amp;quot;5c2c78de645d59a57500e0a3ba19d91ff8dc902a6d75c16512d013449a74957c&amp;quot;,&amp;quot;5da0e429c410ce6220f7206e6ee41f0fc8216000908b3d8eeb651345fb5e7435&amp;quot;,&amp;quot;5eebfbda3754fc240d1b87806cf57c0f6805eee3cbf8b0c29f8da96017ddbc1f&amp;quot;,&amp;quot;5f6d93830779e69b1a9e44ceb81fe42ddbc1b453014548b44b348d5e979f98cc&amp;quot;,&amp;quot;601f57984bead5aa7767885e2d01e9d24582c1c7a2f7e907b70b76bf773726d3&amp;quot;,&amp;quot;60ae2132f0864e3700db8b6a30ee7e4d7e7479798c5ce14df23a7935016b2eac&amp;quot;,&amp;quot;67177915a8a163c49f0cfe7f12a065e24046d8b32ee4b6b5071954c12f9f8173&amp;quot;,&amp;quot;67398f5c224a83debf5455b5caa6976249d35344a3b4f39700cda11569494203&amp;quot;,&amp;quot;68d1bfff53204d0eeadb35540ddcb43ad2c7aaa9ff647052ab4f2d66f3094e8d&amp;quot;,&amp;quot;6962015317f58edbed7b8725f344a25fb7d8dfca743715558d916cf1a8b32b24&amp;quot;,&amp;quot;6ab7e2e0c7749ea166968629f584c2be8687667fdf6861d53368c944e10eda3a&amp;quot;,&amp;quot;6b11cbd800814e5d86afcd3daf56fed4e8f987007ff4ab835a05e6de470f35ff&amp;quot;,&amp;quot;6ba15ceea3a22c3a8b3539c1124a4d641409a680db07af35e35d73da877e8da4&amp;quot;,&amp;quot;6c41c14638745ca2b820153386fd95948d8bf048750328cd397d05241ebec08c&amp;quot;,&amp;quot;6f3e68f9b4d007249b4585b0760e2b892a7f6b8fd2ef568e93856da20d96ebe4&amp;quot;,&amp;quot;702a98c7b9a4cccce628ea40ec94f9663c9f3163190c18c0d5011fae44f50a7c&amp;quot;,&amp;quot;7084504bf52356da59c8ca8e96c6cb4d2d85f10ae4c02fa74b50e26c6b8467a0&amp;quot;,&amp;quot;737e38e017b1a9308ea2264c8c4e9bba612ffba3fb44de505f3e479ea1d572a4&amp;quot;,&amp;quot;75b3d2188033c8e2a9f5aed17cd80c71d5599f9af23ed36a9561bdc3a15fec04&amp;quot;,&amp;quot;76b16f3014b25107d0b88172c2913980948c9bc8c68132ea424c54c00e7858d5&amp;quot;,&amp;quot;77141d625b4521eeab882b79e217cfe19cf8e74a757729152bf60ee5a70071fc&amp;quot;,&amp;quot;7b309dc1e54d784f3772631dc4b01f5dc414904d21f77905c9f6d70bf8423d67&amp;quot;,&amp;quot;7b4a63bc061f7e95461631e58aaf96314591ae0fb0feef90ecc31003824eb66b&amp;quot;,&amp;quot;7b7a0136f2fc529018f0568a21bcb73996375ed9eb2c627846b28f5b09095a0d&amp;quot;,&amp;quot;7d00ff77f0f12ab7799ed571bcb438df230135e26796cc4b984908103beae847&amp;quot;,&amp;quot;801314902f70f8939fef64267687d2bb95c333a62464ee5db76b88aed8b9d360&amp;quot;,&amp;quot;80757f7f5a5ecd47e64cd5299442038b7922d15d5c303d2a950deac204b7807e&amp;quot;,&amp;quot;836bea75b79376c547544b06298cd3fb3f5974641b3ceb77eaba687e19e2cec4&amp;quot;,&amp;quot;86d5cf06b40acdf96215db8a767df3e1fd2c8e4641007e8ee5c6f8bd9b47f3ea&amp;quot;,&amp;quot;8a4f4d6acdf5d875e2ae14cc17becbb45072c7229a864b3fa1cdc80b45d80597&amp;quot;,&amp;quot;8ab04f7f610a17d08613fca7d79dde9fb5817904e1055bd6b8eb574e9531ff5b&amp;quot;,&amp;quot;8b1dd8aa0b6272770d2491d35944fb9b3d3169c72e8275ef2411b801fed1785a&amp;quot;,&amp;quot;8c7695f70007d17fbdcbcbeb921837b2c5ef3469c27ca65ef3e75e0634e06357&amp;quot;,&amp;quot;8ccf0173e0006b65019d4b2634f824c69883f8bb6ab3670eff36183df45d437a&amp;quot;,&amp;quot;8cedf02ad54c94948e69c69dacf8b5f94d6a20b156f112b79b635610b9abccfd&amp;quot;,&amp;quot;8e0e0aa6ae3df684489ef41c6c65e5c9fb9d72d2aa455b2453a6495ab45aa29b&amp;quot;,&amp;quot;9059fb2f4ddb94bfe924c3c009e1e1cd8da53513c9ec1a1aa7e20c2376274dd5&amp;quot;,&amp;quot;911766a8e660a973180d306aa95fe2b9037f37db28cf166e59aaf986ec72608e&amp;quot;,&amp;quot;95bd4211a0fdb9c028c1b7f694b72ab8222ead20d0f83edd7288ef19105208f8&amp;quot;,&amp;quot;971e6feb86d955f9aa194e25c596499b5ab5683c68766877b14eacaa86ed6836&amp;quot;,&amp;quot;993fcab01aa5882308af5b870c0a191884ff4ecdb8cee964ad58e96781763d65&amp;quot;,&amp;quot;9af2c6bb2897847bf8ebb71ee600c810354bdf8aa78ad8aab864ba89be3aae0a&amp;quot;,&amp;quot;9b4d84991e2dd181570dd4f5d18e533c57252ec8ddb6642c990386e8cd57cbd7&amp;quot;,&amp;quot;a05b2c1547f8513ded94425763b6f34cf3019e7f649163d31fd8fec770950fd4&amp;quot;,&amp;quot;a36f43271195cf031b2a0e3df297a206088a11c3f03cc4ec255721c017825140&amp;quot;,&amp;quot;a3825df57a7f4d6e3f204d35d1b58f24d0a89dece8c8e8cf277fbad2283eaf0e&amp;quot;,&amp;quot;a3a6ccc3af9becf7135b58798e5190251c8499171681b3c2c1110dd0cb1ca0f2&amp;quot;,&amp;quot;a3dbbdbe58586d5917828a058b37e471e15d6a42688397e93888d6ce58025a55&amp;quot;,&amp;quot;a48a185b6d50ae91a94b571bb43f173102a172cd886649bbe1563c875ca2142a&amp;quot;,&amp;quot;a4b7d03a4af6e2225902e026adb2e265e07a10a8a062a49aad2f544fd7c900f8&amp;quot;,&amp;quot;a6de57825868deebdb57a405c7f9085f21a249ea9d36bf1c18e9c709280523dc&amp;quot;,&amp;quot;a7a9eb9c044a5fc5e27bc9ba533b794543e154c2081266988e2ca07e37380787&amp;quot;,&amp;quot;a92d2d46d0d65e3ea05b68ab16b32bed760fa2955c9f6b9f91687e429724524c&amp;quot;,&amp;quot;a9c2cff9357c003de5e6498e0af52ad8f24778fd18ca274fd135a7dbb4464a8a&amp;quot;,&amp;quot;aa1d22c31d4dc4114888bccbd7110a1f777887ed8dd2dfa006eaaeeac58d2a44&amp;quot;,&amp;quot;aa313832f108aecbfae05acab011d40ff1d1ec540cd2025851dcc10d92bcd0c3&amp;quot;,&amp;quot;abbcfbdc79d0536344295d6e0cd6d7ae788a385836c33c7ef7f98f6064ad2ee1&amp;quot;,&amp;quot;ac3a732c65504a9f4e728cbaf80d4d58f74a3834138a224657eebd03982c1898&amp;quot;,&amp;quot;ac6eb25fa5be2a1d1418879791cadf43b1a268cb3aa2e505977cb29e4b7035dd&amp;quot;,&amp;quot;adec207d59a23cfc8afc63b0e45bfdefde9b7ffe74515872f0837025530ab6eb&amp;quot;,&amp;quot;ae1584bf163b05c014d0d99715f481655949c7762d800997562fc93f3da731b8&amp;quot;,&amp;quot;b1403965758e40e9d2eb31950f97dc599368edeb98541ede8df2b512ef2fd3bf&amp;quot;,&amp;quot;b3c086e90eda12260b5bfe8eff16a051882dfd921c02140194c0e0ee9a849466&amp;quot;,&amp;quot;b4062fe2f07abe03e2e9b88b571c7f2d9c058c78fb157d3d04fa39feda380a02&amp;quot;,&amp;quot;b416514b63420449c6c56781adafff18f6f28733aeb2fb4bb0c1abeadbd6db6e&amp;quot;,&amp;quot;b7bfbbc5fad15123960443cb0c118162a62a4b92732a8365eeb77e8df25eca46&amp;quot;,&amp;quot;b871fea4a33e5e51ff648ca74d16a34f179d3467805cad84238c729282e8acf7&amp;quot;,&amp;quot;b878eaf74341fbc65c609785b93b38d90f841f2d50bb39496e1f4b1b34b2255d&amp;quot;,&amp;quot;b9a80691e7d9423ad546a96363a017a4a0725dc854de082d6927da6cd6aa19c2&amp;quot;,&amp;quot;ba7ef3d90be2bc57c785f55457971ff0812a4d9b9df18ab980229ce648cee31d&amp;quot;,&amp;quot;ba8669e2e19c21a0045d994c56e811b2d1d51451ab248e76df456427d0d20569&amp;quot;,&amp;quot;bc260c6b49fe06a331202a2b703cb051aa352d17a8373496dd5ef67ab404a145&amp;quot;,&amp;quot;bd260517b438daa35921cca54b8c2dcd48b8ca338f7166d91ecd3a3eb14c9d7f&amp;quot;,&amp;quot;be375723b763ea3e88f9539eebd1f73f8af0b463b7bb88781dc3f589ab36e9ad&amp;quot;,&amp;quot;c0c4c3b3cd1b400b81316dd67001b92a512569dadd0ed6f783e87e601c8ea54e&amp;quot;,&amp;quot;c156c12f1256b4a2a6c0558b7094e263876586e4a72333da2997fb97cbb8d15d&amp;quot;,&amp;quot;c2a5f97fa1daf09015fa78a57b2aed1d33b9c18ffb84bb7f3d0e8d643532b772&amp;quot;,&amp;quot;c54d091b9d006ed79405b62defa7910a7ab9db6463f46ab1c50064df152aa887&amp;quot;,&amp;quot;c5a7a5ed8e2b4e72ca8c72025e91e14388ee23c7822c16bd3fe3b11c206ffb84&amp;quot;,&amp;quot;c5b5f35b88138f27b6aa2395f423d15dbf642258971102de77359ff79eb8d4cb&amp;quot;,&amp;quot;ca52540a211bac9449b45662ac2a6a00899bf55b5867017ab73b1973ef3a8f6c&amp;quot;,&amp;quot;cc6f6ad1f5a023bb52f7638f883d4bf20dab6bd3a0b1b9a3c8526fc99aee81d2&amp;quot;,&amp;quot;cef0df2d68b4f38fd9ce501839e3d4d2a40317d845037baa2b7ffb3ed45918c1&amp;quot;,&amp;quot;cfd0806446352b03d89be45f1014c0a48728286c5b12fc89d32a3cb31896765d&amp;quot;,&amp;quot;d03fe289cf120bdb3ae70711da1c8972f650fb8e5c4f91dabf17639a2c7ecb06&amp;quot;,&amp;quot;d1089a3f2e4f0d043eec44395a5522f107fc649ca561f76013d412c85710c306&amp;quot;,&amp;quot;d1a68d6cf85c32a15011cd13b374ab8aad619b1b437ffd262c446cc079babedc&amp;quot;,&amp;quot;d4201c9a33e19e2ba351ec288ec5a43f4b3f2cb133d6a7977f72c529d3e03408&amp;quot;,&amp;quot;d5991156ebb5beeac70ac0cfc1706990be5752b41bafbe31228053fe18dc3e67&amp;quot;,&amp;quot;d86adacb713cc4ecf06828aeb2b8e1bb0311144986978c59240ce996214ab69f&amp;quot;,&amp;quot;dab5fe0369dca967e09653cb0475e09636091ba0a6ee95289de49fe97e505f3d&amp;quot;,&amp;quot;db0ee162bc04083d6caed8a88a7be44b02d15b2686a2d6dd06a10d024cefb40d&amp;quot;,&amp;quot;dc453efc8162dbff08e04fdda7a5dcbd986ee0fbee547764ff7ae89afe68806b&amp;quot;,&amp;quot;dc5e2a39f8e1ce90f88c3f50076ed03188fc60e87b103a0d48e66fe462b7777f&amp;quot;,&amp;quot;df826a504bad73ab69fcd740f72e6e00488e69db8ec31a55ffb3ed43b0845cba&amp;quot;,&amp;quot;e05d71cfe0b356b0dddee437f9da2610f85c5dffedc3ab058172ab71624a7d14&amp;quot;,&amp;quot;e10fb8c50f8e378b43f4f80b41e62b78dc968496196ae8399fa7d203e213a3cd&amp;quot;,&amp;quot;e5b9be11e940019582c6ac0875f54e7bc92fd15149cecf4e1bf67d4357010cce&amp;quot;,&amp;quot;e7a64e4c08350ee2f0ecc3af4c2df7388da044de4f7955a941ff965a925b54b8&amp;quot;,&amp;quot;e84b2c1129b574a485dfa7d8843cf569b3679f234b681f6f8fa0d88d5489b224&amp;quot;,&amp;quot;e8df3c1953e9c32ae77bbf01dcec48e1052271e0eb6d556da9deda1c50426231&amp;quot;,&amp;quot;ec46f3be50d9f2f6472669b8c8e38addd54c00bc206c81e873f340c0a11d71f2&amp;quot;,&amp;quot;eca4fdc50f34ccf5e0b459b0a077ec9033cf25c58e29b3406f24eab6445a6221&amp;quot;,&amp;quot;edc7488d9f86de7d094c1d02119680b91a15a28cf7a8b09cf9cf194193ae81bc&amp;quot;,&amp;quot;ee4b82dc8f11c5459a42090c1aafaf645f2c1d247edec1d9b0fae46f4efaa02f&amp;quot;,&amp;quot;f03f924d1767b748f8fc15bcef798076e746a7917f5fc7b89e2ed022c95faa82&amp;quot;,&amp;quot;f104ccccf3bc11107b27900670f36de7fdda3a0a7d086d2dc69b4903aa2cbcd5&amp;quot;,&amp;quot;f18d25a1fabd8f3a62edb164c759b650c13c320f2edc7cab44c01ae88809b285&amp;quot;,&amp;quot;f2a1ff85c3ac02574d1f55b067c841ea4b0283ed9543f11752fa41723b315ed9&amp;quot;,&amp;quot;f46a661429090548bfe775c5df5197b0cf6ae5d38a215986b79de385b52d4223&amp;quot;,&amp;quot;f5d19ba9a4a11db479fd80aea1674eb896f515fd43f34c456b09f49500ecd4b7&amp;quot;,&amp;quot;f629a172edcac21d929169f2bb1dcf148110151b769bae15e4fc09bd72898fd2&amp;quot;,&amp;quot;f6d1ca49cea130563f72f266612eb901c9290b3bf36fd4218d5881c5c9d7d35f&amp;quot;,&amp;quot;f79f17ff115716f428034aa9181d63e67649404559448193fb6c96f35cad3e00&amp;quot;,&amp;quot;ff0e08dd175e3badf556ea843a972edea4c80f461cfdabbfdb69167ba3845055&amp;quot;]&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== address information ====&lt;br /&gt;
https://mtgox.com/api/1/generic/bitcoin/addr_details?hash=1f27d1fc284143729944ab89823111d2bb63dc46&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Order lag ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/order/lag&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;lag&amp;quot; value is the age in microseconds of the oldest order pending execution&lt;br /&gt;
If it&#039;s too large it means the engine is busy, and the depth is probably not reliable&lt;br /&gt;
&lt;br /&gt;
==== Currency information ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/currency&lt;br /&gt;
&lt;br /&gt;
pass parameter ?currency=&amp;lt;currency_symbol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
returns information about a currency ( number of decimals . . . )&lt;br /&gt;
&lt;br /&gt;
=== Private API ===&lt;br /&gt;
&lt;br /&gt;
==== Private info ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/private/info&lt;br /&gt;
&lt;br /&gt;
returns information about your account, funds, fees, API privileges, withdraw limits . . .&lt;br /&gt;
&lt;br /&gt;
==== get a bitcoin deposit address ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/bitcoin/address&lt;br /&gt;
&lt;br /&gt;
get a bitcoin address linked to your account.&lt;br /&gt;
the returned address can be used to deposit bitcoins in your mtgox account&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
result: &lt;br /&gt;
{&lt;br /&gt;
 &amp;quot;return&amp;quot;: &lt;br /&gt;
 {&amp;quot;addr&amp;quot;: &amp;quot;18dGNs5Bd6pPMuSchLHQtb1k996YpUHs3j&amp;quot;},&lt;br /&gt;
  &amp;quot;result&amp;quot;: &amp;quot;success&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 optional parameters : &lt;br /&gt;
&lt;br /&gt;
description : a description for the address , a new description will generate a new address&lt;br /&gt;
&lt;br /&gt;
ipn : an URL that will be pinged when this new address receives a transaction, the ping is a POST request with txid, blockid, description . . . as parameters&lt;br /&gt;
&lt;br /&gt;
==== redeem a private key ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/private/bitcoin/addpriv&lt;br /&gt;
&lt;br /&gt;
 allows you to add a private key to your account&lt;br /&gt;
&lt;br /&gt;
* parameters : &lt;br /&gt;
&amp;quot;key&amp;quot;:code&lt;br /&gt;
&amp;quot;keytype&amp;quot;:&amp;quot;auto&amp;quot;&lt;br /&gt;
&amp;quot;description&amp;quot;:description&lt;br /&gt;
&lt;br /&gt;
* returns the btc adress and the total number of btcs in this private key&lt;br /&gt;
&lt;br /&gt;
==== redeem a wallet.dat ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/bitcoin/wallet_add&lt;br /&gt;
&lt;br /&gt;
 allows you to add a wallet.dat file to your account&lt;br /&gt;
&lt;br /&gt;
* parameters : &lt;br /&gt;
&amp;quot;wallet&amp;quot;: the file content of a wallet.dat file ( base64 encoded )&lt;br /&gt;
&amp;quot;description&amp;quot;: optional parameter to add a description linked to this wallet in the account history&lt;br /&gt;
&lt;br /&gt;
* returns : &amp;quot;amount&amp;quot; ( total number of btcs in this wallet ) + count ( number of bitcoin addresses in this wallet )&lt;br /&gt;
&lt;br /&gt;
==== idKey ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/private/idkey&lt;br /&gt;
&lt;br /&gt;
Returns the idKey used to subscribe to a user&#039;s private updates channel in the websocket API. The key is valid for 24 hours.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Your trade history ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCUSD/private/trades&lt;br /&gt;
https://mtgox.com/api/1/BTCEUR/private/trades&lt;br /&gt;
&lt;br /&gt;
Returns all of your trades in this currency (BTCUSD, BTCEUR . . . ) . Does not include fees.&lt;br /&gt;
&lt;br /&gt;
==== Your wallet history ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/private/wallet/history&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;README!&#039;&#039;&#039; if the above call does not work please use: https://mtgox.com/api/1/generic/wallet/history&lt;br /&gt;
&lt;br /&gt;
parameters : currency, type, date_start, date_end, trade_id, page&lt;br /&gt;
&lt;br /&gt;
only the currency parameter is mandatory&lt;br /&gt;
&lt;br /&gt;
returns a json array with your wallet history&lt;br /&gt;
&lt;br /&gt;
==== Submit an order ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/BTCUSD/private/order/add&lt;br /&gt;
&lt;br /&gt;
parameters: &lt;br /&gt;
* type (bid|ask) (easier to remember: &#039;&#039;&#039;b&#039;&#039;&#039;id == &#039;&#039;&#039;b&#039;&#039;&#039;uy, ask == sell)&lt;br /&gt;
* amount_int &amp;lt;amount as int&amp;gt;&lt;br /&gt;
* price_int &amp;lt;price as int&amp;gt; (can be omitted to place market order)&lt;br /&gt;
 &lt;br /&gt;
submits an order and returns the OID and info about success or error&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
[1] =&amp;gt; Array&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;return&amp;quot;: &amp;quot;4c2e69f5-8b35-4171-95a3-9e4088c1586c&amp;quot;,&lt;br /&gt;
    &amp;quot;result&amp;quot;: &amp;quot;success&amp;quot;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Your open orders ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/private/orders&lt;br /&gt;
 &lt;br /&gt;
Returns information about your current open orders. Valid order statuses are: pending, executing, post-pending, open, stop, and invalid.&lt;br /&gt;
&lt;br /&gt;
The order can have 2 amounts, the valid amount and the invalid ( unfunded ) amount.&lt;br /&gt;
valid amount and invalid amount will be updated when funds are added or when other orders are removed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;PHP&amp;quot;&amp;gt;&lt;br /&gt;
 [1] =&amp;gt; Array&lt;br /&gt;
        (&lt;br /&gt;
            [oid] =&amp;gt; 66a115f2-9919-487a-9eba-99a0141c9590&lt;br /&gt;
            [currency] =&amp;gt; USD&lt;br /&gt;
            [item] =&amp;gt; BTC&lt;br /&gt;
            [type] =&amp;gt; ask&lt;br /&gt;
            [amount] =&amp;gt; Array&lt;br /&gt;
                (&lt;br /&gt;
                    [value] =&amp;gt; 1.00000000&lt;br /&gt;
                    [value_int] =&amp;gt; 100000000&lt;br /&gt;
                    [display] =&amp;gt; 1.00000000 BTC&lt;br /&gt;
                    [display_short] =&amp;gt; 1.00 BTC&lt;br /&gt;
                    [currency] =&amp;gt; BTC&lt;br /&gt;
                )&lt;br /&gt;
&lt;br /&gt;
            [valid_amount] =&amp;gt; Array&lt;br /&gt;
                (&lt;br /&gt;
                    [value] =&amp;gt; 0.99470000&lt;br /&gt;
                    [value_int] =&amp;gt; 99470000&lt;br /&gt;
                    [display] =&amp;gt; 0.99470000 BTC&lt;br /&gt;
                    [display_short] =&amp;gt; 0.99 BTC&lt;br /&gt;
                    [currency] =&amp;gt; BTC&lt;br /&gt;
                )&lt;br /&gt;
&lt;br /&gt;
            [price] =&amp;gt; Array&lt;br /&gt;
                (&lt;br /&gt;
                    [value] =&amp;gt; 10.99489&lt;br /&gt;
                    [value_int] =&amp;gt; 1099489&lt;br /&gt;
                    [display] =&amp;gt; $10.99489&lt;br /&gt;
                    [display_short] =&amp;gt; $10.99&lt;br /&gt;
                    [currency] =&amp;gt; USD&lt;br /&gt;
                )&lt;br /&gt;
&lt;br /&gt;
            [status] =&amp;gt; open&lt;br /&gt;
            [date] =&amp;gt; 1344208333&lt;br /&gt;
            [priority] =&amp;gt; 1344208333021535&lt;br /&gt;
            [actions] =&amp;gt; Array&lt;br /&gt;
                (&lt;br /&gt;
                )&lt;br /&gt;
&lt;br /&gt;
            [invalid_amount] =&amp;gt; Array&lt;br /&gt;
                (&lt;br /&gt;
                    [value] =&amp;gt; 0.00530000&lt;br /&gt;
                    [value_int] =&amp;gt; 530000&lt;br /&gt;
                    [display] =&amp;gt; 0.00530000 BTC&lt;br /&gt;
                    [display_short] =&amp;gt; 0.01 BTC&lt;br /&gt;
                    [currency] =&amp;gt; BTC&lt;br /&gt;
                )&lt;br /&gt;
&lt;br /&gt;
        )&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Order result ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/private/order/result&lt;br /&gt;
&lt;br /&gt;
parameters : type ( bid or ask ) and order (the order id)&lt;br /&gt;
&lt;br /&gt;
returns a json array like this : &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
order_id: &#039;1234234-e9ef-4b75-aa1c-90cd109d24ea&#039;,&lt;br /&gt;
  trades:&lt;br /&gt;
   [ { trade_id: &#039;1336611143363429&#039;,&lt;br /&gt;
       primary: &#039;N&#039;,&lt;br /&gt;
       currency: &#039;USD&#039;,&lt;br /&gt;
       type: &#039;ask&#039;,&lt;br /&gt;
       properties: &#039;market,mixed_currency&#039;,&lt;br /&gt;
       item: &#039;BTC&#039;,&lt;br /&gt;
       amount: [Object],&lt;br /&gt;
       price: [Object],&lt;br /&gt;
       date: &#039;2012-05-10 00:52:23&#039; } ],&lt;br /&gt;
  total_amount:&lt;br /&gt;
   { value: &#039;0.01000000&#039;,&lt;br /&gt;
     value_int: &#039;1000000&#039;,&lt;br /&gt;
     display: &#039;0.01000000 BTC&#039;,&lt;br /&gt;
     display_short: &#039;0.01 BTC&#039;,&lt;br /&gt;
     currency: &#039;BTC&#039; } }&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Application API ===&lt;br /&gt;
&lt;br /&gt;
==== HOTP key ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/hotp_gen&lt;br /&gt;
&lt;br /&gt;
used to generate a new HOTP key ( useful for developers )&lt;br /&gt;
&lt;br /&gt;
==== App activation ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/api/activate&lt;br /&gt;
&lt;br /&gt;
parameters:&lt;br /&gt;
* &#039;&#039;&#039;key&#039;&#039;&#039; - Activation key&lt;br /&gt;
* &#039;&#039;&#039;name&#039;&#039;&#039; - Device name&lt;br /&gt;
* &#039;&#039;&#039;app&#039;&#039;&#039; - App ID&lt;br /&gt;
&lt;br /&gt;
used in mobile apps to obtain an API key/secret pair. Contact MagicalTux on freenode to obtain an app ID. Activation key comes from the user&#039;s account, Settings &amp;gt; Access &amp;gt; Application Access.&lt;br /&gt;
&lt;br /&gt;
=== Merchant System ===&lt;br /&gt;
&lt;br /&gt;
==== Order Creation ====&lt;br /&gt;
&lt;br /&gt;
https://mtgox.com/api/1/generic/private/merchant/order/create&lt;br /&gt;
&lt;br /&gt;
===== Required Parameters: =====&lt;br /&gt;
* &#039;&#039;&#039;currency&#039;&#039;&#039;: &#039;&#039;&amp;lt;currency&amp;gt;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;amount&#039;&#039;&#039;: &#039;&#039;&amp;lt;amount as float&amp;gt;&#039;&#039;&lt;br /&gt;
or&lt;br /&gt;
* &#039;&#039;&#039;amount_int&#039;&#039;&#039;: &#039;&#039;&amp;lt;amount as int&amp;gt;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;return_success&#039;&#039;&#039;: &#039;&#039;&amp;lt;string&amp;gt;&#039;&#039; Where to redirect the user on payment success&lt;br /&gt;
* &#039;&#039;&#039;return_failure&#039;&#039;&#039;: &#039;&#039;&amp;lt;string&amp;gt;&#039;&#039; Where to redirect the user on cancellation&lt;br /&gt;
&lt;br /&gt;
===== Optional Parameters: =====&lt;br /&gt;
* &#039;&#039;&#039;description&#039;&#039;&#039;: &#039;&#039;&amp;lt;string&amp;gt;&#039;&#039; A small description that will appear on the payment page (defaults to &amp;quot;Payment to &amp;lt;user_login&amp;gt;&amp;quot;)&lt;br /&gt;
* &#039;&#039;&#039;ipn&#039;&#039;&#039;: &#039;&#039;&amp;lt;string&amp;gt;&#039;&#039; URL that will be called by our services once the payment is complete (more below)&lt;br /&gt;
* &#039;&#039;&#039;data&#039;&#039;&#039;: &#039;&#039;&amp;lt;string&amp;gt;&#039;&#039; Custom data returned by the IPN&lt;br /&gt;
* &#039;&#039;&#039;email&#039;&#039;&#039;: &#039;&#039;int&#039;&#039; Set to 1 to receive an email for each successful payment&lt;br /&gt;
* &#039;&#039;&#039;autosell&#039;&#039;&#039;: &#039;&#039;int&#039;&#039; Set to 1 to automatically sell received bitcoins at market price&lt;br /&gt;
* &#039;&#039;&#039;multipay&#039;&#039;&#039;: &#039;&#039;int&#039;&#039; Set to 1 to allow multiple payments on the same transaction ID&lt;br /&gt;
* &#039;&#039;&#039;instant_only&#039;&#039;&#039;: &#039;&#039;int&#039;&#039; Set to 1 to only allow MtGox users to pay on this transaction&lt;br /&gt;
&lt;br /&gt;
===== Returns =====&lt;br /&gt;
* &#039;&#039;&#039;transaction&#039;&#039;&#039;: &#039;&#039;&amp;lt;uuid&amp;gt;&#039;&#039; A unique transaction ID&lt;br /&gt;
* &#039;&#039;&#039;payment_url&#039;&#039;&#039;: &#039;&#039;&amp;lt;string&amp;gt;&#039;&#039; URL on which to redirect the user&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== IPN ====&lt;br /&gt;
The IPN (Instant payment notification) is a mechanism that POST data about a successful payment an a custom URL located on your website right after the payment as been validated. It is signed with your API key.&lt;br /&gt;
Your website is supposed then to either acknowledge the IPN by returning &amp;quot;[OK]&amp;quot; as is. Anything else will be counted as an error and the system will try sending the IPN back every 30 minutes until it succeed.&lt;br /&gt;
&lt;br /&gt;
===== Content =====&lt;br /&gt;
&lt;br /&gt;
The IPN POST data will always contain the following:&lt;br /&gt;
* &#039;&#039;&#039;id&#039;&#039;&#039;: &#039;&#039;&amp;lt;uuid&amp;gt;&#039;&#039; The transaction ID generated by the initial call&lt;br /&gt;
* &#039;&#039;&#039;payment_id&#039;&#039;&#039;: &#039;&#039;&amp;lt;uuid&amp;gt;&#039;&#039; The payment ID&lt;br /&gt;
* &#039;&#039;&#039;status&#039;&#039;&#039;: &#039;&#039;&amp;lt;enum&amp;gt;&#039;&#039; Either &#039;&#039;&#039;paid&#039;&#039;&#039;, &#039;&#039;&#039;partial&#039;&#039;&#039;, &#039;&#039;&#039;cancelled&#039;&#039;&#039; or &#039;&#039;&#039;closed&#039;&#039;&#039; (4th one shouldn&#039;t happen)&lt;br /&gt;
&lt;br /&gt;
If the status is &#039;&#039;&#039;partial&#039;&#039;&#039;, the user choose to pay without a MtGox account and bitcoins where detected on the network, we then send you an IPN telling you the amount of bitcoins pending and valid, pending bitcoins have less than 6 confirmations so it is up to you to accept or not the transaction based on that value. Your merchant account will be credited only after the 6 confirmations on our end.&lt;br /&gt;
&lt;br /&gt;
Additional content of the &#039;&#039;&#039;partial&#039;&#039;&#039; IPN:&lt;br /&gt;
* &#039;&#039;&#039;amount_pending&#039;&#039;&#039;: &#039;&#039;&amp;lt;amount as int&amp;gt;&#039;&#039; The amount still pending confirmations&lt;br /&gt;
* &#039;&#039;&#039;amount_valid&#039;&#039;&#039;: &#039;&#039;&amp;lt;amount as int&amp;gt;&#039;&#039; The amount of bitcoins for which we had 6 confirmations&lt;br /&gt;
* &#039;&#039;&#039;amount_total&#039;&#039;&#039;: &#039;&#039;&amp;lt;amount as int&amp;gt;&#039;&#039; The total amount, pending and valid, on the payment address&lt;br /&gt;
&lt;br /&gt;
If the status is &#039;&#039;&#039;paid&#039;&#039;&#039;:&lt;br /&gt;
* &#039;&#039;&#039;amount&#039;&#039;&#039;: &#039;&#039;&amp;lt;amount as int&amp;gt;&#039;&#039; The amount paid by the user&lt;br /&gt;
* &#039;&#039;&#039;currency&#039;&#039;&#039;: &#039;&#039;&amp;lt;currency&amp;gt;&#039;&#039; The currency used to pay (should always be BTC for now)&lt;br /&gt;
* &#039;&#039;&#039;method&#039;&#039;&#039;: &#039;&#039;&amp;lt;enum&amp;gt;&#039;&#039; The payment method, for now MTGOXBTC&lt;br /&gt;
* &#039;&#039;&#039;date&#039;&#039;&#039;: &#039;&#039;&amp;lt;date&amp;gt;&#039;&#039; The payment date&lt;br /&gt;
&lt;br /&gt;
If data was provided in the initial call:&lt;br /&gt;
* &#039;&#039;&#039;data&#039;&#039;&#039;: &#039;&#039;&amp;lt;string&amp;gt;&#039;&#039; The data provided when creating the transaction&lt;br /&gt;
&lt;br /&gt;
===== Signature =====&lt;br /&gt;
&lt;br /&gt;
IPNs are now signed with the user secret like the original query to prevent fraudulents IPNs&lt;br /&gt;
Two headers are added to the request:&lt;br /&gt;
* &#039;&#039;&#039;HTTP_REST_KEY&#039;&#039;&#039;: &#039;&#039;&amp;lt;uuid&amp;gt;&#039;&#039; The ReST key used for the query&lt;br /&gt;
* &#039;&#039;&#039;HTTP_REST_SIGN&#039;&#039;&#039;: &#039;&#039;&amp;lt;string&amp;gt;&#039;&#039; The IPN signature&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;HTTP_REST_SIGN&#039;&#039;&#039; is a base64 encoded sha512 HMAC of the post data using your ReST secret as a key.&lt;br /&gt;
&lt;br /&gt;
See below for examples:&lt;br /&gt;
&lt;br /&gt;
====== PHP ======&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
function mtgox_is_valid_ipn() {&lt;br /&gt;
    $secret = &#039;&#039;;&lt;br /&gt;
    $raw_post_data = file_get_contents(&amp;quot;php://input&amp;quot;);&lt;br /&gt;
    $good_sign = hash_hmac(&#039;sha512&#039;, $raw_post_data, base64_decode($secret), true);&lt;br /&gt;
    $sign = base64_decode($_SERVER[&#039;HTTP_REST_SIGN&#039;]);&lt;br /&gt;
    return ($sign == $good_sign);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Dynamic Button ====&lt;br /&gt;
&lt;br /&gt;
While you can create buttons through the MtGox website, those are generated with the normal API. To display a button with your API transaction, first add the following markup to your page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;html5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;mtgox&amp;quot; data-id=&amp;quot;&amp;lt;txid&amp;gt;&amp;quot; data-amount=&amp;quot;&amp;lt;amount&amp;gt;&amp;quot; data-currency=&amp;quot;&amp;lt;currency&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;a href=&amp;quot;https://payment.mtgox.com/&amp;lt;txid&amp;gt;&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;img src=&amp;quot;https://payment.mtgox.com/img/mtgox-checkout.png&amp;quot; border=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;!-- You only need the following tag once on the page, after all the buttons (for example on the last line before closing the &amp;lt;body&amp;gt; tag) --&amp;gt;&lt;br /&gt;
&amp;lt;![if !IE]&amp;gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;https://payment.mtgox.com/js/button.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;![endif]&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure to change &#039;&#039;&#039;&amp;lt;txid&amp;gt;&#039;&#039;&#039;, &#039;&#039;&#039;&amp;lt;amount&amp;gt;&#039;&#039;&#039; and &#039;&#039;&#039;&amp;lt;currency&amp;gt;&#039;&#039;&#039; to whatever value apply to that transaction.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
=== Goxcli ===&lt;br /&gt;
best example of all, using nearly all the API methods, works as an intereactive shell and as a shell API so you can build your own app on top of it : &lt;br /&gt;
&lt;br /&gt;
python : https://github.com/Trasp/GoxCLI&lt;br /&gt;
&lt;br /&gt;
=== bitcoin_dealer (trading script) ===&lt;br /&gt;
&lt;br /&gt;
python (django) : https://github.com/rokj/bitcoin_dealer&lt;br /&gt;
&lt;br /&gt;
=== magento mtgox ===&lt;br /&gt;
&lt;br /&gt;
magento ( php ) module  : https://github.com/MtGox/magento&lt;br /&gt;
&lt;br /&gt;
=== XChange ===&lt;br /&gt;
&lt;br /&gt;
XChange (Java) API : https://github.com/timmolter/XChange&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[MtGox/API/Streaming]]&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31774</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31774"/>
		<updated>2012-10-13T10:59:01Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: Module names update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
&lt;br /&gt;
== Definition of Terms ==&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
* Protocol: V0/V1 - Support for the MtGox HTTP protocol version 0 or version 1.&lt;br /&gt;
* Protocol: WebSocket - Support for the streaming websocket protocol.&lt;br /&gt;
* Adaptive caching - Allow the frameworks cache for trades and depth to be updated adaptively via the WebSocket stream.&lt;br /&gt;
* Non-Blocking - The framework uses a non blocking method of communication with the MtGox API, that is its possible to execute many simultaneous tasks in parallel. This is beneficial to large applications that may have to manage multiple trades very quickly.&lt;br /&gt;
* Object Orientated - The framework uses an object based programming style.&lt;br /&gt;
* Blocking - The framework uses a blocking style of communication with the MtGox API, this menas that for instance when you place an order you have to wait for the information to come back to you before you can proceed. This is often easier to use for small bots and tickers.&lt;br /&gt;
* Maintained - If the framework is knowingly maintained.&lt;br /&gt;
* COMPAT_Linux - The framework is compatible with: linux.&lt;br /&gt;
* COMPAT_WIN32 - The framework is compatible with: windows (32bit).&lt;br /&gt;
* COMPAT_WIN32 - The framework is compatible with: windows (64bit).&lt;br /&gt;
* COMPAT_BSD - The framework is compatible with: BSD.&lt;br /&gt;
* Language - The language the framework is based in and the minimum version required. (Example: Python32, Perl 5.10)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Frameworks ==&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Protocol: V1&lt;br /&gt;
* Protocol: WebSocket&lt;br /&gt;
* Safety caching &lt;br /&gt;
* Adaptive caching&lt;br /&gt;
* Non-Blocking&lt;br /&gt;
* Object Orientated&lt;br /&gt;
* Maintained&lt;br /&gt;
* COMPAT_Linux&lt;br /&gt;
* COMPAT_BSD&lt;br /&gt;
* Language: Perl 5.10+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Server::SafetyNet ===&lt;br /&gt;
A pure adaptive cache for MtGox; that will automatically keep track of all the Trade Histories and Depth queries and serve them its self instead of querying MtGox, so if your client is a bit spam happy and keeps getting dropped by MtGox for spam protection; you can run your own safety net server to get around it. This would also be useful for multiple mtgox clients behind the same IP, if you simply need to contact MtGox through PoCo::MtGox::Client the best bit is using PoCo-MtGox-Winproxy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Server::WinProxy ===&lt;br /&gt;
A proposed extension to PoCo::MtGox that allows the same functionality, but will work on the windows architecture by offsetting processing to a linux or BSD mid-way server. There are security implications with doing this however; the BSD/Linux mid server will have to know your private key/secret, it would be advised that you run your own Mid-Level server on your own for all your windows machines unless you really trust the WinProxy provider.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31738</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31738"/>
		<updated>2012-10-11T11:19:40Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: Phew.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
&lt;br /&gt;
== Definition of Terms ==&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
* Protocol: V0/V1 - Support for the MtGox HTTP protocol version 0 or version 1.&lt;br /&gt;
* Protocol: WebSocket - Support for the streaming websocket protocol.&lt;br /&gt;
* Adaptive caching - Allow the frameworks cache for trades and depth to be updated adaptively via the WebSocket stream.&lt;br /&gt;
* Non-Blocking - The framework uses a non blocking method of communication with the MtGox API, that is its possible to execute many simultaneous tasks in parallel. This is beneficial to large applications that may have to manage multiple trades very quickly.&lt;br /&gt;
* Object Orientated - The framework uses an object based programming style.&lt;br /&gt;
* Blocking - The framework uses a blocking style of communication with the MtGox API, this menas that for instance when you place an order you have to wait for the information to come back to you before you can proceed. This is often easier to use for small bots and tickers.&lt;br /&gt;
* Maintained - If the framework is knowingly maintained.&lt;br /&gt;
* COMPAT_Linux - The framework is compatible with: linux.&lt;br /&gt;
* COMPAT_WIN32 - The framework is compatible with: windows (32bit).&lt;br /&gt;
* COMPAT_WIN32 - The framework is compatible with: windows (64bit).&lt;br /&gt;
* COMPAT_BSD - The framework is compatible with: BSD.&lt;br /&gt;
* Language - The language the framework is based in and the minimum version required. (Example: Python32, Perl 5.10)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Frameworks ==&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Protocol: V1&lt;br /&gt;
* Protocol: WebSocket&lt;br /&gt;
* Safety caching &lt;br /&gt;
* Adaptive caching&lt;br /&gt;
* Non-Blocking&lt;br /&gt;
* Object Orientated&lt;br /&gt;
* Maintained&lt;br /&gt;
* COMPAT_Linux&lt;br /&gt;
* COMPAT_BSD&lt;br /&gt;
* Language: Perl 5.10+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client::SafetyNet ===&lt;br /&gt;
A proposed extension to PoCo::MtGox that allows the same functionality, but will work on the windows architecture by offsetting processing to a linux or BSD mid-way server. There are security implications with doing this however; the BSD/Linux mid server will have to know your private key/secret, it would be advised that you run your own Mid-Level server on your own for all your windows machines unless you really trust the SafetyNet provider.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31737</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31737"/>
		<updated>2012-10-11T11:15:03Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: Re Updated&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
&lt;br /&gt;
== Definition of Terms ==&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
* Protocol: V0/V1 - Support for the MtGox HTTP protocol version 0 or version 1.&lt;br /&gt;
* Protocol: WebSocket - Support for the streaming websocket protocol.&lt;br /&gt;
* Adaptive caching - Allow the frameworks cache for trades and depth to be updated adaptively via the WebSocket stream.&lt;br /&gt;
* Non-Blocking - The framework uses a non blocking method of communication with the MtGox API, that is its possible to execute many simultaneous tasks in parallel. This is beneficial to large applications that may have to manage multiple trades very quickly.&lt;br /&gt;
* Object Orientated - The framework uses an object based programming style.&lt;br /&gt;
* Blocking - The framework uses a blocking style of communication with the MtGox API, this menas that for instance when you place an order you have to wait for the information to come back to you before you can proceed. This is often easier to use for small bots and tickers.&lt;br /&gt;
* Maintained - If the framework is knowingly maintained.&lt;br /&gt;
* COMPAT_Linux/COMPAT_WIN32/COMPAT_WIN32/COMPAT_BSD - The framework is compatible with: linux, windows (32bit), windows (64bit) or BSD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Frameworks ==&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Protocol: V1&lt;br /&gt;
* Protocol: WebSocket&lt;br /&gt;
* Safety caching &lt;br /&gt;
* Adaptive caching&lt;br /&gt;
* Non-Blocking&lt;br /&gt;
* Object Orientated&lt;br /&gt;
* Maintained&lt;br /&gt;
* COMPAT_Linux&lt;br /&gt;
* COMPAT_BSD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client::SafetyNet ===&lt;br /&gt;
A proposed extension to PoCo::MtGox that allows the same functionality, but will work on the windows architecture by offsetting processing to a linux or BSD mid-way server. There are security implications with doing this however; the BSD/Linux mid server will have to know your private key/secret, it would be advised that you run your own Mid-Level server on your own for all your windows machines unless you really trust the SafetyNet provider.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31736</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31736"/>
		<updated>2012-10-11T11:10:47Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: blah&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
&lt;br /&gt;
== Definition of Terms ==&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
* Non-Blocking - The framework uses a non blocking method of communication with the MtGox API, that is its possible to execute many simultaneous tasks in parallel. This is beneficial to large applications that may have to manage multiple trades very quickly.&lt;br /&gt;
* Object Orientated - The framework uses an object based programming style.&lt;br /&gt;
* Blocking - The framework uses a blocking style of communication with the MtGox API, this menas that for instance when you place an order you have to wait for the information to come back to you before you can proceed. This is often easier to use for small bots and tickers.&lt;br /&gt;
* Maintained - If the framework is knowingly maintained.&lt;br /&gt;
* COMPAT_Linux/COMPAT_WIN32/COMPAT_WIN32/COMPAT_BSD - The framework is compatible with: linux, windows (32bit), windows (64bit) or BSD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Frameworks ==&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Safety caching &lt;br /&gt;
* Non-Blocking&lt;br /&gt;
* Object Orientated&lt;br /&gt;
* Maintained&lt;br /&gt;
* COMPAT_Linux&lt;br /&gt;
* COMPAT_BSD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client::SafetyNet ===&lt;br /&gt;
A proposed extension to PoCo::MtGox that allows the same functionality, but will work on the windows architecture by offsetting processing to a linux or BSD mid-way server. There are security implications with doing this however; the BSD/Linux mid server will have to know your private key/secret, it would be advised that you run your own Mid-Level server on your own for all your windows machines unless you really trust the SafetyNet provider.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31735</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31735"/>
		<updated>2012-10-11T11:10:04Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: added coming up&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
&lt;br /&gt;
== Definition of Terms ==&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
* Non-Blocking - The framework uses a non blocking method of communication with the MtGox API, that is its possible to execute many simultaneous tasks in parallel. This is beneficial to large applications that may have to manage multiple trades very quickly.&lt;br /&gt;
* Object Orientated - The framework uses an object based programming style.&lt;br /&gt;
* Blocking - The framework uses a blocking style of communication with the MtGox API, this menas that for instance when you place an order you have to wait for the information to come back to you before you can proceed. This is often easier to use for small bots and tickers.&lt;br /&gt;
* Maintained - If the framework is knowingly maintained.&lt;br /&gt;
* COMPAT_Linux/COMPAT_WIN32/COMPAT_WIN32/COMPAT_BSD - The framework is compatible with: linux, windows (32bit), windows (64bit) or BSD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Frameworks ==&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Safety caching &lt;br /&gt;
* Non-Blocking&lt;br /&gt;
* Object Orientated&lt;br /&gt;
* Maintained&lt;br /&gt;
* COMPAT_Linux&lt;br /&gt;
* COMPAT_BSD&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client::SafetyNet ===&lt;br /&gt;
A proposed extension to PoCo::MtGox that allows the same functionality as PoCo::MtGox but will work on the windows architecture by offsetting processing to a linux or BSD mid-way server. There are security implications with doing this however; the BSD/Linux mid server will have to know your private key/secret, it would be advised that you run your own Mid-Level server on your own for all your windows machines unless you really trust the SafetyNet provider.&lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31734</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31734"/>
		<updated>2012-10-11T10:58:47Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: moved warning up&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
&lt;br /&gt;
== Definition of Terms ==&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
&lt;br /&gt;
== Frameworks ==&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Safety caching &lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31733</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31733"/>
		<updated>2012-10-11T10:58:03Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: minor update to layout&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&lt;br /&gt;
&lt;br /&gt;
== Definition of Terms ==&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
&lt;br /&gt;
== Frameworks ==&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Safety caching &lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31732</id>
		<title>MtGox/API/Frameworks</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/Frameworks&amp;diff=31732"/>
		<updated>2012-10-11T10:56:59Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: just added stub page for frameworks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Foreword ==&lt;br /&gt;
A list of some of the larger more commonly used FrameWorks used with the MtGox API&lt;br /&gt;
This section of the wiki is heavily under construction so antipate that some functions and frameworks may not have complete documented examples!&lt;br /&gt;
&lt;br /&gt;
=== Definition of Terms ===&lt;br /&gt;
* Safety caching - This process means the framework will actively cache &#039;save&#039; information from queries so to reduce the amount of &#039;outbound&#039; http calls required to mtgox, this is highly recommended as some features such as &#039;fullDepth&#039; and &#039;Trades&#039; are limted on MtGox its self.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== POE::Component::MtGox::Client ===&lt;br /&gt;
A perl based framework developed by Paul G Webster &#039;daemon&#039; utilizing the non-blocking functions of POE, no large applications we know about yet use this, however it does implement some impressive features:&lt;br /&gt;
&lt;br /&gt;
* Safety caching &lt;br /&gt;
&lt;br /&gt;
=== Finance::MtGox ===&lt;br /&gt;
The original perl based framework for MtGox, unrated.&lt;br /&gt;
&lt;br /&gt;
=== Add more ===&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/HTTP&amp;diff=31353</id>
		<title>MtGox/API/HTTP</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/HTTP&amp;diff=31353"/>
		<updated>2012-09-30T02:10:50Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: Updated to reflect API updated 0-&amp;gt;1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Two versions of the HTTP API are currently available, see the following pages for details on the methods available for each:&lt;br /&gt;
&lt;br /&gt;
* [[MtGox/API/HTTP/v0|Version 0]]&lt;br /&gt;
* [[MtGox/API/HTTP/v1|Version 1]]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
All HTTP API requests are sent to URLs beginning with &amp;lt;nowiki&amp;gt;https://mtgox.com/api/*&amp;lt;/nowiki&amp;gt;. It allows placing orders, performing withdrawls, deposits, and other things. All responses are in [http://json.org/ JSON] format.&lt;br /&gt;
&lt;br /&gt;
There is a [https://rubygems.org/gems/mtgox Ruby gem], [https://rubygems.org/gems/guten-mtgox guten-mtgox] and a [[Finance::MtGox|Perl module]] available for interacting with the HTTP API.&lt;br /&gt;
&lt;br /&gt;
== Cache ==&lt;br /&gt;
&lt;br /&gt;
All API methods are cached for 10 seconds. Do not request results more often than that, you might be blocked by the anti-DDoS filters.&lt;br /&gt;
&lt;br /&gt;
== Currency Symbols ==&lt;br /&gt;
List of the currency symbols available with the API:&lt;br /&gt;
&lt;br /&gt;
USD, AUD, CAD, CHF, CNY, DKK, EUR, GBP, HKD, JPY, NZD, PLN, RUB, SEK, SGD, THB&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Authentication is performed by signing each request using HMAC-SHA512. The request must contain an extra value &amp;quot;nonce&amp;quot; which must be an always incrementing numeric value.  A reference implementation is provided here:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;basically the base64 string should contain:&#039;&#039;&#039;&lt;br /&gt;
* the binary representation of the api key id&lt;br /&gt;
* binary hmac-sha512 signature&lt;br /&gt;
* json data&lt;br /&gt;
&lt;br /&gt;
api key looks like that: 12345678-abcd-1234-abcd-50286e649d5c&lt;br /&gt;
&lt;br /&gt;
it&#039;s actually hexadecimal, it should be converted to binary&lt;br /&gt;
&lt;br /&gt;
hash should then be appended (binary too) and then encode everything in base64&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning : the API is no more accepting authentication by login/pass ( since 2012 march 1 ) , you _need_ to use an API key.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== perl ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT! This is a simplified perl module simply returning user info not a full API, it is shown simply for illustrative purposes for those wishing to developing there own modules from scratch.. or bots.. or other&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT! This requires you compiled perl libwww with https support&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/perl&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
use Time::HiRes qw(gettimeofday);&lt;br /&gt;
use MIME::Base64;&lt;br /&gt;
use Digest::SHA qw(hmac_sha512);&lt;br /&gt;
&lt;br /&gt;
use JSON;&lt;br /&gt;
use LWP::UserAgent;&lt;br /&gt;
&lt;br /&gt;
use Data::Dumper;&lt;br /&gt;
&lt;br /&gt;
my $lwp = LWP::UserAgent-&amp;gt;new;&lt;br /&gt;
$lwp-&amp;gt;agent(&amp;quot;perl $]&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
my $json = JSON-&amp;gt;new-&amp;gt;allow_nonref;&lt;br /&gt;
&lt;br /&gt;
my $secret = &#039;_MTGOX API SECRET GET YOURS AT https://classic.mtgox.com/support/tradeAPI&#039;;&lt;br /&gt;
my $key = &#039;_MTGOX API KEY GET YOURS AT https://classic.mtgox.com/support/tradeAPI&#039;;&lt;br /&gt;
&lt;br /&gt;
## user code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
my $request = genReq(&#039;/1/generic/private/info&#039;);&lt;br /&gt;
my $res = $lwp-&amp;gt;request($request);&lt;br /&gt;
&lt;br /&gt;
# Check the outcome of the response&lt;br /&gt;
if ($res-&amp;gt;is_success) {&lt;br /&gt;
        print Dumper($json-&amp;gt;decode( $res-&amp;gt;content )).&amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else { print $res-&amp;gt;status_line, &amp;quot;\n&amp;quot;; }&lt;br /&gt;
&lt;br /&gt;
exit 0;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## sub routines and helpers&lt;br /&gt;
&lt;br /&gt;
sub genReq {&lt;br /&gt;
        my ($uri) = shift;&lt;br /&gt;
&lt;br /&gt;
        my $req = HTTP::Request-&amp;gt;new(POST =&amp;gt; &#039;https://mtgox.com/api/&#039;.$uri);&lt;br /&gt;
        $req-&amp;gt;content_type(&#039;application/x-www-form-urlencoded&#039;);&lt;br /&gt;
        $req-&amp;gt;content(&amp;quot;nonce=&amp;quot;.microtime());&lt;br /&gt;
        $req-&amp;gt;header(&#039;Rest-Key&#039; =&amp;gt; $key);&lt;br /&gt;
        $req-&amp;gt;header(&#039;Rest-Sign&#039; =&amp;gt; signReq($req-&amp;gt;content(),$secret));&lt;br /&gt;
&lt;br /&gt;
        return $req;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
sub signReq {&lt;br /&gt;
        my ($content,$secret) = @_;&lt;br /&gt;
        return encode_base64(hmac_sha512($content,decode_base64($secret)));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub microtime { return sprintf &amp;quot;%d%06d&amp;quot;, gettimeofday; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== PHP ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
function mtgox_query($path, array $req = array()) {&lt;br /&gt;
	// API settings&lt;br /&gt;
	$key = &#039;&#039;;&lt;br /&gt;
	$secret = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
	// generate a nonce as microtime, with as-string handling to avoid problems with 32bits systems&lt;br /&gt;
	$mt = explode(&#039; &#039;, microtime());&lt;br /&gt;
	$req[&#039;nonce&#039;] = $mt[1].substr($mt[0], 2, 6);&lt;br /&gt;
&lt;br /&gt;
	// generate the POST data string&lt;br /&gt;
	$post_data = http_build_query($req, &#039;&#039;, &#039;&amp;amp;&#039;);&lt;br /&gt;
&lt;br /&gt;
	// generate the extra headers&lt;br /&gt;
	$headers = array(&lt;br /&gt;
		&#039;Rest-Key: &#039;.$key,&lt;br /&gt;
		&#039;Rest-Sign: &#039;.base64_encode(hash_hmac(&#039;sha512&#039;, $post_data, base64_decode($secret), true)),&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	// our curl handle (initialize if required)&lt;br /&gt;
	static $ch = null;&lt;br /&gt;
	if (is_null($ch)) {&lt;br /&gt;
		$ch = curl_init();&lt;br /&gt;
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);&lt;br /&gt;
		curl_setopt($ch, CURLOPT_USERAGENT, &#039;Mozilla/4.0 (compatible; MtGox PHP client; &#039;.php_uname(&#039;s&#039;).&#039;; PHP/&#039;.phpversion().&#039;)&#039;);&lt;br /&gt;
	}&lt;br /&gt;
	curl_setopt($ch, CURLOPT_URL, &#039;https://mtgox.com/api/&#039;.$path);&lt;br /&gt;
	curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);&lt;br /&gt;
	curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);&lt;br /&gt;
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);&lt;br /&gt;
&lt;br /&gt;
	// run the query&lt;br /&gt;
	$res = curl_exec($ch);&lt;br /&gt;
	if ($res === false) throw new Exception(&#039;Could not get reply: &#039;.curl_error($ch));&lt;br /&gt;
	$dec = json_decode($res, true);&lt;br /&gt;
	if (!$dec) throw new Exception(&#039;Invalid data received, please make sure connection is working and requested API exists&#039;);&lt;br /&gt;
	return $dec;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// example 1: get infos about the account, plus the list of rights we have access to&lt;br /&gt;
var_dump(mtgox_query(&#039;0/info.php&#039;));&lt;br /&gt;
&lt;br /&gt;
// old api (get funds)&lt;br /&gt;
var_dump(mtgox_query(&#039;0/getFunds.php&#039;));&lt;br /&gt;
&lt;br /&gt;
// trade example&lt;br /&gt;
// var_dump(mtgox_query(&#039;0/buyBTC.php&#039;, array(&#039;amount&#039; =&amp;gt; 1, &#039;price&#039; =&amp;gt; 15)));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Python ===&lt;br /&gt;
Python version here: https://bitcointalk.org/index.php?topic=49789.msg592388#msg592388&lt;br /&gt;
&lt;br /&gt;
=== Node.js ===&lt;br /&gt;
Generic [[Node.js Example]] trading library (supports MtGox and Bitfloor): https://github.com/bitfloor/trader.nodejs&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
&lt;br /&gt;
basic [[Java Example]] on https://gist.github.com/2396722 hoping for many java forks and pull requests on github&lt;br /&gt;
&lt;br /&gt;
XChange API : https://github.com/timmolter/XChange&lt;br /&gt;
&lt;br /&gt;
=== Javascript Firefox addon ===&lt;br /&gt;
* [https://github.com/joric/mtgox-ticker] firefox ticker addon&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[MtGox|Mt. Gox]]&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=MtGox/API/HTTP&amp;diff=31352</id>
		<title>MtGox/API/HTTP</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=MtGox/API/HTTP&amp;diff=31352"/>
		<updated>2012-09-30T01:58:39Z</updated>

		<summary type="html">&lt;p&gt;PaulGWebster: Added basic perl client&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Two versions of the HTTP API are currently available, see the following pages for details on the methods available for each:&lt;br /&gt;
&lt;br /&gt;
* [[MtGox/API/HTTP/v0|Version 0]]&lt;br /&gt;
* [[MtGox/API/HTTP/v1|Version 1]]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
All HTTP API requests are sent to URLs beginning with &amp;lt;nowiki&amp;gt;https://mtgox.com/api/*&amp;lt;/nowiki&amp;gt;. It allows placing orders, performing withdrawls, deposits, and other things. All responses are in [http://json.org/ JSON] format.&lt;br /&gt;
&lt;br /&gt;
There is a [https://rubygems.org/gems/mtgox Ruby gem], [https://rubygems.org/gems/guten-mtgox guten-mtgox] and a [[Finance::MtGox|Perl module]] available for interacting with the HTTP API.&lt;br /&gt;
&lt;br /&gt;
== Cache ==&lt;br /&gt;
&lt;br /&gt;
All API methods are cached for 10 seconds. Do not request results more often than that, you might be blocked by the anti-DDoS filters.&lt;br /&gt;
&lt;br /&gt;
== Currency Symbols ==&lt;br /&gt;
List of the currency symbols available with the API:&lt;br /&gt;
&lt;br /&gt;
USD, AUD, CAD, CHF, CNY, DKK, EUR, GBP, HKD, JPY, NZD, PLN, RUB, SEK, SGD, THB&lt;br /&gt;
&lt;br /&gt;
== Authentication ==&lt;br /&gt;
&lt;br /&gt;
Authentication is performed by signing each request using HMAC-SHA512. The request must contain an extra value &amp;quot;nonce&amp;quot; which must be an always incrementing numeric value.  A reference implementation is provided here:&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;basically the base64 string should contain:&#039;&#039;&#039;&lt;br /&gt;
* the binary representation of the api key id&lt;br /&gt;
* binary hmac-sha512 signature&lt;br /&gt;
* json data&lt;br /&gt;
&lt;br /&gt;
api key looks like that: 12345678-abcd-1234-abcd-50286e649d5c&lt;br /&gt;
&lt;br /&gt;
it&#039;s actually hexadecimal, it should be converted to binary&lt;br /&gt;
&lt;br /&gt;
hash should then be appended (binary too) and then encode everything in base64&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning : the API is no more accepting authentication by login/pass ( since 2012 march 1 ) , you _need_ to use an API key.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== perl ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT! This is a simplified perl module simply returning user info not a full API, it is shown simply for illustrative purposes for those wishing to developing there own modules from scratch.. or bots.. or other&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;IMPORTANT! This requires you compiled perl libwww with https support&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/perl&lt;br /&gt;
&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
use Time::HiRes qw(gettimeofday);&lt;br /&gt;
use MIME::Base64;&lt;br /&gt;
use Digest::SHA qw(sha512_base64 hmac_sha512);&lt;br /&gt;
&lt;br /&gt;
use JSON;&lt;br /&gt;
use LWP::UserAgent;&lt;br /&gt;
&lt;br /&gt;
use Data::Dumper;&lt;br /&gt;
&lt;br /&gt;
my $lwp = LWP::UserAgent-&amp;gt;new;&lt;br /&gt;
$lwp-&amp;gt;agent(&amp;quot;perl $]&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
my $json = JSON-&amp;gt;new-&amp;gt;allow_nonref;&lt;br /&gt;
&lt;br /&gt;
my $secret = &#039;_MTGOX API SECRET GET YOURS AT https://classic.mtgox.com/support/tradeAPI&#039;;&lt;br /&gt;
my $key = &#039;_MTGOX API KEY GET YOURS AT https://classic.mtgox.com/support/tradeAPI&#039;;&lt;br /&gt;
&lt;br /&gt;
## user code&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
my $request = genReq(&#039;0/info.php&#039;);&lt;br /&gt;
my $res = $lwp-&amp;gt;request($request);&lt;br /&gt;
&lt;br /&gt;
# Check the outcome of the response&lt;br /&gt;
if ($res-&amp;gt;is_success) {&lt;br /&gt;
        print Dumper($json-&amp;gt;decode( $res-&amp;gt;content )).&amp;quot;\n&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
else { print $res-&amp;gt;status_line, &amp;quot;\n&amp;quot;; }&lt;br /&gt;
&lt;br /&gt;
exit 0;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
## sub routines and helpers&lt;br /&gt;
&lt;br /&gt;
sub genReq {&lt;br /&gt;
        my ($uri) = shift;&lt;br /&gt;
&lt;br /&gt;
        my $req = HTTP::Request-&amp;gt;new(POST =&amp;gt; &#039;https://mtgox.com/api/&#039;.$uri);&lt;br /&gt;
        $req-&amp;gt;content_type(&#039;application/x-www-form-urlencoded&#039;);&lt;br /&gt;
        $req-&amp;gt;content(&amp;quot;nonce=&amp;quot;.microtime());&lt;br /&gt;
        $req-&amp;gt;header(&#039;Rest-Key&#039; =&amp;gt; $key);&lt;br /&gt;
        $req-&amp;gt;header(&#039;Rest-Sign&#039; =&amp;gt; signReq($req-&amp;gt;content(),$secret));&lt;br /&gt;
&lt;br /&gt;
        return $req;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
sub signReq {&lt;br /&gt;
        my ($content,$secret) = @_;&lt;br /&gt;
        return encode_base64(hmac_sha512($content,decode_base64($secret)));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub microtime { return sprintf &amp;quot;%d%06d&amp;quot;, gettimeofday; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== PHP ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
function mtgox_query($path, array $req = array()) {&lt;br /&gt;
	// API settings&lt;br /&gt;
	$key = &#039;&#039;;&lt;br /&gt;
	$secret = &#039;&#039;;&lt;br /&gt;
&lt;br /&gt;
	// generate a nonce as microtime, with as-string handling to avoid problems with 32bits systems&lt;br /&gt;
	$mt = explode(&#039; &#039;, microtime());&lt;br /&gt;
	$req[&#039;nonce&#039;] = $mt[1].substr($mt[0], 2, 6);&lt;br /&gt;
&lt;br /&gt;
	// generate the POST data string&lt;br /&gt;
	$post_data = http_build_query($req, &#039;&#039;, &#039;&amp;amp;&#039;);&lt;br /&gt;
&lt;br /&gt;
	// generate the extra headers&lt;br /&gt;
	$headers = array(&lt;br /&gt;
		&#039;Rest-Key: &#039;.$key,&lt;br /&gt;
		&#039;Rest-Sign: &#039;.base64_encode(hash_hmac(&#039;sha512&#039;, $post_data, base64_decode($secret), true)),&lt;br /&gt;
	);&lt;br /&gt;
&lt;br /&gt;
	// our curl handle (initialize if required)&lt;br /&gt;
	static $ch = null;&lt;br /&gt;
	if (is_null($ch)) {&lt;br /&gt;
		$ch = curl_init();&lt;br /&gt;
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);&lt;br /&gt;
		curl_setopt($ch, CURLOPT_USERAGENT, &#039;Mozilla/4.0 (compatible; MtGox PHP client; &#039;.php_uname(&#039;s&#039;).&#039;; PHP/&#039;.phpversion().&#039;)&#039;);&lt;br /&gt;
	}&lt;br /&gt;
	curl_setopt($ch, CURLOPT_URL, &#039;https://mtgox.com/api/&#039;.$path);&lt;br /&gt;
	curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);&lt;br /&gt;
	curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);&lt;br /&gt;
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);&lt;br /&gt;
&lt;br /&gt;
	// run the query&lt;br /&gt;
	$res = curl_exec($ch);&lt;br /&gt;
	if ($res === false) throw new Exception(&#039;Could not get reply: &#039;.curl_error($ch));&lt;br /&gt;
	$dec = json_decode($res, true);&lt;br /&gt;
	if (!$dec) throw new Exception(&#039;Invalid data received, please make sure connection is working and requested API exists&#039;);&lt;br /&gt;
	return $dec;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// example 1: get infos about the account, plus the list of rights we have access to&lt;br /&gt;
var_dump(mtgox_query(&#039;0/info.php&#039;));&lt;br /&gt;
&lt;br /&gt;
// old api (get funds)&lt;br /&gt;
var_dump(mtgox_query(&#039;0/getFunds.php&#039;));&lt;br /&gt;
&lt;br /&gt;
// trade example&lt;br /&gt;
// var_dump(mtgox_query(&#039;0/buyBTC.php&#039;, array(&#039;amount&#039; =&amp;gt; 1, &#039;price&#039; =&amp;gt; 15)));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Python ===&lt;br /&gt;
Python version here: https://bitcointalk.org/index.php?topic=49789.msg592388#msg592388&lt;br /&gt;
&lt;br /&gt;
=== Node.js ===&lt;br /&gt;
Generic [[Node.js Example]] trading library (supports MtGox and Bitfloor): https://github.com/bitfloor/trader.nodejs&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
&lt;br /&gt;
basic [[Java Example]] on https://gist.github.com/2396722 hoping for many java forks and pull requests on github&lt;br /&gt;
&lt;br /&gt;
XChange API : https://github.com/timmolter/XChange&lt;br /&gt;
&lt;br /&gt;
=== Javascript Firefox addon ===&lt;br /&gt;
* [https://github.com/joric/mtgox-ticker] firefox ticker addon&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&lt;br /&gt;
* [[MtGox|Mt. Gox]]&lt;/div&gt;</summary>
		<author><name>PaulGWebster</name></author>
	</entry>
</feed>