Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7715279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:20:42+00:00 2026-06-01T02:20:42+00:00

I am trying to parse a file which has ITCH messages in it: http://www.nasdaqtrader.com/Trader.aspx?id=DPSpecs_USEquities#TVITCH

  • 0

I am trying to parse a file which has ITCH messages in it:

http://www.nasdaqtrader.com/Trader.aspx?id=DPSpecs_USEquities#TVITCH¬
http://www.nasdaqtrader.com/content/technicalsupport/specifications/dataproducts/NQTV-ITCH-V4_1.pdf¬

Each price is represented as a 32bit fixed point number with 18 whole part bits and 14 decimal part bits. (6 whole number digits followed by 4 decimal digits)

e.g.

200,000.0000
110000110101000000 00000000000000

I have had a look at the struct class but this only deals with whole bytes as its for converting from binary encoded c structs.

I have had a look at the decimal.Decimal module but it seems that you can only instantiate it using a string and this assumes that you already have the number in string format.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:20:44+00:00Added an answer on June 1, 2026 at 2:20 am

    Python’s struct.unpack() is exactly what you need. You just need to formulate the appropriate format string so the module can know what fields are where and what binary format they have, and you should quickly be able to decode your data.

    You explained things in terms of bits, but that’s not how ITCH really works. The fixed-decimal fields really are N bytes long, with some decimal shift implied. So you can read a price field as an integer and then divide it by 1e4 to get the float value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I am trying to Parse a local xml file (which has database table
I am trying to parse the xml file which has collection of nested tags.I
I am trying to parse this xml file, which has some nested nodes. I
I am trying to parse specific XML file which is located in sub directories
I'm working on a 1 Gigabyte JSON text file which I'm trying to parse
I am trying to create a very simple antlr grammar file which should parse
I'm trying to parse a file that has the following format: BEGIN:VEVENT CREATED:20120504T163940Z DTEND;TZID=America/Chicago:20120504T130000
I am trying to parse a json file of 5mb, which is causing out
I'm trying to parse an xml file that has the contents of a simple
I am trying to parse a file generated by LGA Tracon that lists the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.