Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Python for Finance

You're reading from   Mastering Python for Finance Understand, design, and implement state-of-the-art mathematical and statistical applications used in finance with Python

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher Packt
ISBN-13 9781784394516
Length 340 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Python for Financial Applications FREE CHAPTER 2. The Importance of Linearity in Finance 3. Nonlinearity in Finance 4. Numerical Procedures 5. Interest Rates and Derivatives 6. Interactive Financial Analytics with Python and VSTOXX 7. Big Data with Python 8. Algorithmic Trading 9. Backtesting 10. Excel with Python Index

Forex trading with OANDA API


In the previous sections, we implemented a trading system by interfacing with Interactive Brokers' Trader WorkStation X through the socket connections over a single port. However, many other brokers offer different choices of hooking up customized trading software over an API. In this section, we will learn how to interface our trading strategy with OANDA's REST API. OANDA is a major player in the foreign exchange (forex) business servicing retail investors. We will use a trend-following strategy to trade forex products.

What is REST?

REST stands for Representational State Transfer. It refers to web service APIs for transferring data over HTTP using the GET, PUT, POST, or DELETE methods.

With the REST API, we can stream the market data and trade the markets using any programming language that supports data transfer over HTTP connections along with a JavaScript Object Notation (JSON) parser.

Note that REST connections are stateless—the sender or receiver does not...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime