MODERATORS
5 stars based on
80 reviews
With the LocalBitcoins API you can query our public trade data and advertisements, manage your LocalBitcoins account by updating advertisements, automate trading and more. If you're not coming from a programming localbitcoins javascript 0 you will probably have a difficult time understanding this guide.
To help you get started with coding you can take a look at Code Academy that offers free courses in coding. Certain Localbitcoins javascript 0 endpoints can be accessed without authentication, API endpoints that have to do with user account actions almost always require authentication. A few API requests can be made without authentication, but will return more information if you send authenticated API requests.
This secret is used to sign your API requests, to ensure that it's really you who is making the requests. The second option is OAuth 2 which can be used when you want to create applications for other users e. OAuth 2 is not available by default, to use oAuth you need to request permission by opening a support ticket.
Include in the ticket a description of your project and reasons why it can't localbitcoins javascript 0 implemented using HMAC. Permissions are granted on a case-by-case basis. You can find it here Github. This can be very useful if you're having problems calculating correct HMAC signatures. If you are planning on integrating our API to your E-commerce platform, take a look at this guide. A total of three HTTP header fields are needed:. You can request multiple permissions at the same localbitcoins javascript 0 by selecting them while holding down ctrl or cmd with OS X.
Each request also requires a nonce. A nonce is an integer number, that needs to increase with every API request. It's value has to always be greater than the previous request. It is used to ensure identical API requests have different localbitcoins javascript 0, making impossible for someone to copy your API requests and re-execute them later on. A good trick to creating the nonce is to use the unix timestamp in milliseconds. This way you'll always get an incrementing localbitcoins javascript 0, just be careful to not send two API calls at the same time or they will have the same Nonce.
With most programming languages you can urlencode your API requests using standard functions. With Python you can use urllib. If the API request ended in an unrecoverable error, there is no data top level field. This helps against accidentally using an error message as legitimate data, creating confusing situations.
Errors will also return with an appropriate HTTP error code. The error object can contain more fields if specified on the error documentation. An example error return object:. You can find a full list of error codes and their meanings at the end of this page. Pagination lives in the pagination field of the returned JSON object. If there are no pages, the field is undefined.
If there are more than one page, the pagination field defines the next field. If you've requested the last page, only the prev field is defined.
On intermediate pages the pagination object contains both the next and prev fields. The next and prev fields are URLs pointing to the respective page. They are usable as is. Example of a paginated return value:. It is not possible to configure the maximum amount of items returned at a time.
There is no concept of page numbers either. In APIs localbitcoins javascript 0 contacts or ads, the data fields returned can localbitcoins javascript 0 specified. Use a request parameter of fieldswhich is a comma-separated list of field names. Only those fields will be returned in the data. If the fields parameter is not given, all fields are returned. If an empty fields parameter is given, no data fields are returned. If specifying fields that do not exist in the source data, localbitcoins javascript 0 error is given: The fields specified only affect the data structure.
A list of localbitcoins javascript 0 API endpoints, both public and authenticated. Certain unauthenticated endpoints return more information if you send the request authenticated. The response contains the same information that localbitcoins javascript 0 found on an account's public profile page. If there are a lot of ads, the response will be paginated.
You can filter the response using the optional arguments. If the advertisement's owner is the same user as the token owner, there are more fields in addition to the above:.
If the token owner can create a trade with the advertisement, the contact form URL is also returned. If this is set TRUEthe ad has displays a green thumb on the website. If the advertisement is not viewable an error is returned. Returns all advertisements from localbitcoins javascript 0 comma-separated list of ad IDs. Invalid advertisement ID's are ignored and no error is returned.
Errors in the new values are reported in the localbitcoins javascript 0 key. If there are any errors, no changes will be made to the ad. Do not make frequent calls to this endpoint. If you want to update price equation localbitcoins javascript 0, please use this API call instead. This API endpoint is for creating new advertisements for the token owner. Only fields listed localbitcoins javascript 0 can be used with the API, use the web site to change the rest of them.
Weekdays start from Sunday and each weekday contains start and end that are measured as 15 minutes. So for example 4 means Creating Local advertisements functions the same as online advertisements but with a couple of differences:. Update price equation of an advertisement.
If there are problems with new equation, the price and equation are not updated and advertisement remains visible. Sending a request to this endpoint with an advertisement ID created by the token owner deletes the advertisement. If the release was successful a localbitcoins javascript 0 is returned on the data key. Returns all chat messages from the trade. The structure of a message is as follows:. Starts a dispute on the localbitcoins javascript 0 trade Localbitcoins javascript 0 if the requirements for starting the dispute has been fulfilled.
See the FAQ for up-to-date details regarding dispute requirements. You can provide a short localbitcoins javascript 0 description using topic. This helps customer support to deal with the problem. Cancels the trade if the token owner is the Bitcoin buyer. Bitcoin sellers cannot cancel trades. Attempts to fund an unfunded local trade from the localbitcoins javascript 0 owners wallet.
Works only if the token owner is the Bitcoin seller in the trade. Marks the identity of trade partner as verified. You must be the advertiser in this trade. Localbitcoins javascript 0 the contact was able to be funded automatically is indicated at data.
The token owner needs localbitcoins javascript 0 be either a buyer or seller in the contacts, contacts that do not pass this check are simply not returned. List of valid and recognized countrycodes for LocalBitcoins. Return value is structured like so:. List of valid and recognized fiat currencies for LocalBitcoins.
Also contains human readable name for every currency and boolean that tells if currency is an altcoin. This API end point mirrors the website's dashboard, allowing access to contacts in localbitcoins javascript 0 states. All contacts where the token owner localbitcoins javascript 0 participating are returned. Once a trade enters a state a datetime is set it will never unset the state. See the current list of payment details information supported on LocalBitcoins.
Returns a list of all released trades where the token owner is either a buyer or seller. Returns a list of all canceled trades where the token owner is either a buyer or seller. Returns a list of all closed trades where the token owner is either a localbitcoins javascript 0 or seller. Gives feedback to user. Possible feedback values are: You may also set feedback message using msg field with few exceptions. Expires the current access token immediately.