Skip to Content
Python算法交易
book

Python算法交易

by Yves Hilpisch
November 2022
Intermediate to advanced
392 pages
10h 8m
Chinese
China Electric Power Press Ltd.
Content preview from Python算法交易
250
|
第
8
章
如果你注册账号成功,并且已经登录到平台上,则应该看到如图
8-5
所示的起始页面。
在中间部分,你可以找到需要安装的
fxTrade Practice for Desktop
应用程序的下
载链接。程序运行后,它看起来类似图
8-1
所示的屏幕截图。
图 8-5:Oanda 账户的起始页面
8.2 Oanda
应用程序接口
注册后,就可以轻松的访问
Oanda
的
API
了。需要的主要信息就是帐号和访问令牌
(
API
密钥)。你可以在“管理资金”区域中找到账号。可以在“管理
API
访问”
区域中生成访问令牌(见图
8-6
)。
注
1
从现在开始,我们将使用
configparser
(
https://oreil.ly/UaQyo
)模块管理账户凭据。
该模块需要一个文本文件(例如叫作
pyalgo.cfg
),文件格式如下,配合
Oanda
练
习账户一起使用:
注 1: 某些对象的命名在 Oanda API 的上下文中并不完全一致。 例如,
AP
key
和
access
token
可以互换使用。 另外,
account ID
和
account number
指的是同一个号码。
使用
Oanda
进行
CFD
交易
|
251
[oanda]
account_id = YOUR_ACCOUNT_ID
access_token = YOUR_ACCESS_TOKEN ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

人工智能技术与大数据

人工智能技术与大数据

Posts & Telecom Press, Anand Deshpande, Manish Kumar
图解大模型 : 生成式AI 原理与实战

图解大模型 : 生成式AI 原理与实战

Jay Alammar, Maarten Grootendorst

Publisher Resources

ISBN: 9787519869694