Jump to content
  • 2

API /session v3 no longer works


tfyfe

Question

Hi, I have been using the REST API for some months now successfully and as of this week it has stopped working. 
 

I am trying to login to my demo account. I receive the following error in my app and also on the API companion. 

 

V2 of the /session API works fine with the same username, password, api key etc.  
 

URL

https://demo-api.ig.com/gateway/deal/session

Headers

Name=Value

Content-Type=application/json; charset=UTF-8

Accept=application/json; charset=UTF-8

X-IG-API-KEY=my api key

Version=3

Body

{
    "identifier": "my username",
    "password": "my password"
}

 

Result

HTTP 401

status: error


content-length: 50
content-type: application/json

 

{
    "errorCode": "error.security.oauth-token-invalid"
}
Link to comment

12 answers to this question

Recommended Posts

  • 0

Had the same issue. I emailed the helpdesk and they said 

Quote

That is a known issue that our team is currently investigating.  You  can reference

INC0761055 should you need an update on it.

 

Link to comment
  • 0

I have the same issue, started yesterday evening:

trading_ig.rest.IGException: HTTP error: 401 {"errorCode":"error.security.oauth-token-invalid"}


I run everything via git/container and therefore  confident I have not changed anything.

I do run multiple sessions (3x) using the same account, wondering if this is now being stopped.

I have not had a single issue for more than a year.

  • Like 1
Link to comment
  • 0

I had this issue yesterday actually, The API needs to be better documented. It seems to be abandoned but VERY helpful and useful for some of us. The only way I find out is by literally looking at the JSON responses as the documentation is out of date. 

Link to comment
  • 0

Same for me, it stopped working this week with no changes to my code base. 
I can sort of get the api companion working at labs.ig,com but i can't for the life of me figure out how that can work by my code doesn't. 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • image.png

  • Posts

    • I am also new to this platform.  I also have a question related to spread betting for UK tax. IG always specifically mention spread betting is exempt from capital gain tax and stamp duty but never mention income tax. Does anyone know for sure if the profits and losses in spread betting need to be reported as income?  If so, should it be the net P&L for positions that are closed within the tax year?
    • Understanding the Repo Market: A Simple Guide Imagine you have a valuable watch, but you need some quick cash to pay for a surprise expense. You go to a pawnshop and offer your watch as collateral for a short-term loan. The pawnshop gives you the cash, and you agree to buy back your watch the next day, paying a little extra for the service. This is essentially how the repo market works in the financial world. What Is the Repo Market? The repo market (short for repurchase agreement market) is a crucial part of the financial system where banks and other financial institutions borrow and lend money to each other, usually overnight. They use high-quality securities, like government bonds, as collateral to secure these loans. How Does It Work? The Borrower (Seller): Needs cash for a short period. The Lender (Buyer): Has extra cash and wants to earn a small return with minimal risk. Collateral: High-quality assets like government securities are used to secure the loan. The Process: Step 1: The borrower sells securities to the lender and receives cash. Step 2: Both parties agree that the borrower will repurchase the same securities at a future date (often the next day) at a slightly higher price. Step 3: The difference in price represents the interest paid for the loan. Why Is the Repo Market Important? Liquidity Management: It allows financial institutions to manage their day-to-day cash needs efficiently. Low Risk: Using high-quality collateral reduces the risk for lenders. Interest Rates Influence: The repo market helps central banks implement monetary policy by influencing short-term interest rates. Economic Stability: A smooth repo market ensures that money flows effectively through the financial system, supporting lending and investment. Real-World Impact Banks and Businesses: They rely on the repo market to meet short-term funding needs, which helps them operate smoothly. Consumers: While not directly involved, consumers benefit from the stability and liquidity that the repo market provides to the overall economy. Central Banks: Institutions like the Federal Reserve use the repo market as a tool to control money supply and maintain financial stability. Key Takeaways Short-Term Borrowing: The repo market is all about short-term loans, often just overnight. Secured Loans: Loans are backed by high-quality collateral, reducing risk. Essential Function: It keeps the financial system liquid and stable, much like oil in a car engine. In Summary: The repo market is like a financial "pawnshop" for big institutions. It allows banks and other entities to quickly get cash by temporarily exchanging securities, ensuring that money keeps moving through the economy. Understanding the repo market helps explain how financial institutions manage liquidity and how central banks influence interest rates to maintain economic stability. Analyst Peter Mathers TradingLounge™  Source: tradinglounge.com 
    • I've been thinking about how gamers can easily advertise their creations, and what a platform designed for that would look like. This led me to do some research, and I found something interesting. During my search, Google brought up Cros, which is described as the world's most advanced in-game advertising platform. Cross allows advertisers to reach gamers through intrinsic in-game ads that enhance the experience, while also enabling developers to monetize their games without disrupting gameplay. One key aspect is the CROS token—central to Cross's economy. The token powers staking, payments, governance, and validation within the platform. Users can earn and trade CROS by participating in the ecosystem or get it pre-market on Bitget before live trading begins on the 23rd. What do you think of this innovation?
×
×
  • Create New...
us