Past Performances Exported File Format

PTD Comma-Delimited File Standard (revision 1.20)

Aug 1, 2024

Programmers please read the following points carefully:

  1. When string fields contain quotation marks within them, the embedded quotation mark characters (symbol ") will be changed to the percent character (symbol %) when exported by the Post Time Daily. This is due to the fact that some languages do not deal with embedded quotes properly.
  2. When strings contain no information they may be space filled or they may appear in the comma delimited files as two quotes with nothing in between. Our preference is that at some future time if the information for a string field is not available it will contain nothing between the quotes. But we have had many reports from Visual Basic programmers that truly empty strings (NULL) are in some way a problem. PLEASE MAKE SURE that your program can handle space filled strings and empty (NULL) strings. Also don't assume that if a field is defined as string(22) that it will be filled with 22 spaces if empty. It might not. If your programming tool has some kind of trim function we would recommend that you trim all strings and then check their length to determine if they have information or not. That seems safe to us but other methods can work as well.
  3. No assumptions should be made about the order of the entrants in the comma delimited files. The comma delimited files may be in post position order, saddle cloth order, or technically in any other order. The horses in the horse file currently export in the same order as the horses listed in the entrant file but while we DON'T expect that to change that is not guaranteed either.
  4. We will be setting up a system to ensure that those of you who depend on comma delimted files will be emailed WELL in advance of any proposed changes and that you will have a chance to give us input into these changes.
  5. Do not assume that there will be only up to ten pacelines per horse. We are currently putting out 10 pacelines, but could add more at a later date. Field 7 of the ENT file (numberOfPacelines) is the only valid way to determine how many pacelines are present for a horse. You can always choose to ignore those you don't want to use.
  6. Regarding Y2K compliance. There is NOTHING about year two thousand compliance (contrary to popular opinion) that REQUIRES four character date codes. However software which does NOT use two character date codes intelligently (e.g. where the year can't be determined based on some semantic context) will have problems. We will notify you well prior to expanding the year code to four digits so that you have time to update your software. If you can plan for this now and allow for the possibility that the date fields will changed to MM/DD/YYYY in the future that would certainly be desireable. You can determine whether you are dealing with an old or new date by checking the length of the date field. New date fields will be 10 characters long. Old date fields will be 8 characters long.
  7. Programmers – DO NOT HARDCODE the Version string in the sense that you are looking for ONE particular VALUE. We will update this with every major revision of this document. So if you need to check for changes incorporated into a particular version please convert field 1 of the RAC file (Version String) to a number and check by making sure that the version is 1.5 OR GREATER. Do NOT code for = to version 1.5 as your code will SURELY break when we update this field.

Sample comma delimited files are available on our website via the home page at https://www.posttimedaily.com.

The PTD Comma-Delimited File Standard defines a set of five comma delimited files which together comprise a card of racing at any racetrack.

Our current product, the Post Time Daily will allow exporting our current PTD data file to this PTD Comma Delimited File Standard.

The file naming conventions for the Export files are as follows where E is a constant, TTT is the track code (two or three characters), MM is the month, DD is the date, and YY is the two digit decimal year code. If the track code is two characters, for file naming purposes only, we will use an underscore for the third character.

ETTTMMDD.RYY (for race records) ETTTMMDD.CYY (for class string info for race) ETTTMMDD.EYY (for entry records – horse specific) ETTTMMDD.WYY (for workout records) ETTTMMDD.HYY (for horse records – paceline level)

While the file structures are not totally normalized (if you don't understand this term don't worry), we have tried to make them somewhat relational. The .CLS file which contains the conditions of the race from the racing form can be up to 4100 bytes in length. That is the class information that appears at the top of the race as the race conditions. Because of that, while it logically belongs in the .RAC file, we have extracted it into a separate file so that those of you who cannot handle a string file of this length can ignore it. AT THE END OF THIS CLASS STRING THERE WILL BE A CARRIAGE RETURN CHARACTER (hex 0x0D) followed by the bet types separated by additional CARRIAGE RETURNS if they appear on multiple lines.

The following conventions are followed in this comma-delimited file structure. All string fields are enclosed in double quotation marks. String fields which contain embedded quote characters (symbol ") will have these embedded quote characters changed to the percent character (symbol %). All numeric fields are not enclosed in quotes. Fields defined as date fields are expressed as strings of the form MM/DD/YY and enclosed in quotes just like any other string. Some combination of fields in each record will always constitute a unique key. And there is a well defined way to navigate all 1 to many relationships in these files.

Developers – THE NEXT NOTES ARE VERY IMPORTANT

The following is a list of fields which are NOT currently used but might be in the future.

RAC FILE none

CLS FILE none

ENT FILE Not currently used field 76, 77, 79

WOR FILE Currently the product allows for up to 12 workouts in the Post Time Daily. Changes to this will require a product upgrade, but we might do this in the future. Don't make ANY assumptions about how many work outs we will provide.

HOR FILE not currently used field 21 (we hope to have this back shortly) not currently used field 60, 61-64 not currently used field 80, 81 (we hope to have these back shortly)

NOTE: VERY IMPORTANT INFORMATION ABOUT FRACTIONAL TIMES IN THE HOR FILE We have set up these times in such a way that traditional pace handicappers who need the 2f and 4f time in sprints, and the 4f and 6f time in routes will always find them in the firstCallTime (field 27) and the secondCallTime (field 28).

If a time appears with a ZERO value that means it was not available or is not recorded at a particular distance.

Sprints

(Obviously sprints 4f and shorter cannot have a 4f internal time!) (Many of these shorter sprints will also not have an additionalFractionalTime) (At some tracks these short sprints will have a 2f time but no 4f time) (Example DeD at 4-1/2f seems to report 2f time and final time in some races and 2f time and 4f time in others)

depending on the track where they are run) firstCallTime 2f time secondCallTime 4f time finalTime as expected

additionalFractionalTime (field 30) is the stretch call time in sprints

Sprints between 5-1/2 and 6f additionalFractionalTime (field 30) is 5/8 time

Sprints between 6-1/2 and 7-1/2f additionalFractionalTime (field 30) is 6f time

Routes

firstCallTime 4f time secondCallTime 6f time finalTime as expected

Routes between 8f and 8-1/2f (inclusive) additionalFractionalTime (field 30) is 2f time

Routes above 8-1/2f additionalFractionalTime (field 30) is 8f time

File 1: the .Rxx file

There will be one race record for each race which is running at a track.

Field Type Description
1 string(4) Schema version (currently "1.20")
2 date Race date (format: "MM/dd/yy")
3 string (3) Track ID
4 number Race number
5 string (3) Actual track ID if a simulcast race, or blank if N/A
6 number Actual race number if a simulcast race, or 0 if N/A
7 number Race distance (in feet). E.g., 6 furlongs is 3960 feet
8 number Inner track indicator: 0 = No, 1 = Yes
9 number Turf indicator: 0 = No, 1 = Yes
10 number About distance indicator: 0 = No, 1 = Yes
11 number Race class:
0 = Maiden Claiming
1 = Maiden Special Weight
2 = Claiming
3 = Allowance
4 = Stakes
5 = Handicap
12 number Maximum claiming price
13 number Minimum claiming price
14 number Purse
15 string (3) Age restrictions: "2", "2UP", "3", "3UP", "4", "4UP", "5", "5UP"
16 number Sex restrictions:
0 = MALE
1 = FEMALE
2 = MIXED
17 number Statebred indicator: 0 = No, 1 = Yes
18 number Restricted indicator: 0 = No, 1 = Yes
19 number Graded Stakes level:
0 = Not graded or unknown
1 = Grade 1
2 = Grade 2
3 = Grade 3
20 string (21) Short class description. Examples:
"Alw 42000N1x"
"Alw 47500N$(3m)"
"LasFlorsBCH-G3"
"Md Sp Wt"
"Clm 25000"
21 string (5) Local post time (format: "h:mm")
22 string (1) Local time zone:
"E" = Eastern
"C" = Central
"M" = Mountain
"P" = Pacific
23 string (5) UTC adjustment amount (i.e., time difference between UTC and this track's local time zone)
24 string (25) Track name
25 number Track record (in seconds). e.g., a time of 1:08:1 would be 68.2 seconds.
26 string (5) Local post time using a 24-hour clock (format: "HH:mm")
27 string Reserved
28 number Course type:
0 = Dirt
1 = Turf
2 = Inner Dirt
3 = Inner Turf
5 = Outer Turf
7 = Downhill Turf
8 = All Weather
33 = Hurdle
65 = Steeplechase
97 = Jumps (or, other)
29 number Reserved

File 2: the .Cxx file

There will be one .CLS record for each race which is running at a track. The first three fields (fields 1-3) provide a unique key for this record. It can be used to relate the .RAC and .CLS files. There is a one-to-one relationship between them. As explained above this is a separate record only for convenience of users who cannot handle a string field that is potentially 4100 bytes in size.

Field Type Description
1 date Race date (format: "MM/dd/yy")
2 string (3) Track ID
3 number Race number
4 string (4100) Full race description and available wagers.

NOTE: this field will also contain a carriage return control character ('\r'), separating the race description from the available wagers.

File 3: the .Exx file

There will be many .ENT records for each race which is running at a track. Generally for each .RAC record there will be many .ENT records although there could be zero or 1 as well. The first three fields date, track, and racenumber can be used to find all the .ENT records for each .RAC record. There is a 1 to many relationship between .RAC and .ENT. The first four fields (fields 1-4) provide a unique key for this record. It can be used to relate the .ENT and .HOR files. There is a one-to-many relationship between the .ENT file and the .HOR file.

Note: Past performances that are downloaded after the saddle cloth numbers are assigned will have these fields already filled in without downloading the additional free saddle cloth file. If pps were downloaded prior to these assignments then the free saddle cloth file will still be needed to fill in these fields.

Field Type Description
1 date Race date (format: "MM/dd/yy")
2 string (3) Track ID
3 number Race number
4 string (22) Runner's name
5 string (4) Saddlecloth/Program number (N/A for "early" cards)
6 string (5) Morning line odds (N/A for "early" cards)
7 number Number of pacelines (e.g., will be 0 for first-time-starters)
8 string (1) Entry letter (will be blank if not part of a coupled entry)
9 number Scratched indicator: 0 = No, 1 = Yes

NOTE: this could indicate either an early scratch OR a runner scratched while using Post Time Daily.
10 number The "current year" displayed in runner's stats box (e.g., 2023).
11 number Starts in the current year
12 number Wins in the current year
13 number Places in the current year
14 number Shows in the current year
15 number Earnings in the current year
16 number The "previous year" displayed in runner's stats box (e.g., 2022).
17 number Starts in the previous year
18 number Wins in the previous year
19 number Places in the previous year
20 number Shows in the previous year
21 number Earnings in the previous year
22 string (40) Owner's name
23 string (5) Color
24 number Year foaled
25 number Month foaled
26 string (5) Breeding location (i.e., state or country)
27 number Age
28 string (1) Sex:
'c' = Colt
'h' = Horse
'g' = Gelding
'r' = Ridgling
'f' = Filly
'm' = Mare
'b' = Spayed mare
29 string (22) Sire's name
30 string (22) Sire's sire name (i.e., paternal grandsire)
31 string (22) Dam's name
32 string (22) Dam's sire name (i.e., maternal grandsire)
33 string (22) Trainer's name
34 string (58) Breeder's name
35 number Trainer starts (current meet)
36 number Trainer wins (current meet)
37 number Trainer places (current meet)
38 number Trainer shows (current meet)
39 number Trainer win percentage (current meet)
40 number Lasix indicator: 0 = No, 1 = Yes
41 number Bute indicator: 0 = No, 1 = Yes
42 number Assigned weight
43 number Apprentice allowance
44 string (22) Jockey's name
45 number Jockey starts (current meet)
46 number Jockey wins (current meet)
47 number Jockey places (current meet)
48 number Jockey shows (current meet)
49 number Jockey win percentage (current meet)
50 number Claiming price (zero if not eligible to be claimed)
51 number Lifetime starts
52 number Lifetime wins
53 number Lifetime places
54 number Lifetime shows
55 number Lifetime earnings
56 number Today's track starts
57 number Today's track wins
58 number Today's track places
59 number Today's track shows
60 number Today's track earnings
61 number Turf starts
62 number Turf wins
63 number Turf places
64 number Turf shows
65 number Turf earnings
66 number Wet track starts
67 number Wet track wins
68 number Wet track places
69 number Wet track shows
70 number Wet track earnings
71 number Todays' distance starts
72 number Today's distance wins
73 number Today's distance places
74 number Today's distance shows
75 number Today's distance earnings
76 number Also-eligible indicator: 0 = No, 1 = Yes
77 number Part-of-field indicator: 0 = No, 1 = Yes

NOTE: not currently used.
78 number Blinkers: 0 = No change, 1 = On today, 2 = Off today
79 number Bandages: 0 = No, 1 = Yes

NOTE: not currently used
80 string (40) Jockey stats string (year-to-date/YTD)

Example: "23:(945 136 .14)"
81 string (40) Trainer stats string (year-to-date/YTD)

Example: "23:(93 11 .12)"
82 date Date of horse's sex change (blank if not applicable)
83 string (1) Horse's previous sex prior to change (blank if not applicable):
'c' = Colt
'h' = Horse
'r' = Ridgling
'f' = Filly
'm' = Mare
84 number Post position
85 number Off-track breeding rating
86 number Turf breeding rating
87 number First-time lasix indicator: 0 = No, 1 = Yes

File 4: the .Wxx file

There will be many .WOR records for each race which is running at a track. The first five fields (fields 1-5) provide a unique key for this record. The first four fields are used to relate the .ENT and .WOR files. There is a one-to-many relationship between them. Generally for each .ENT record there can be many .WOR records although there could be zero or 1 as well. While we currently only have up to 4 workouts for each horse, we expect to ship many more WOR records in the future. Don't assume a maximum number. At least up to twelve will be provided in a future update.

Field Type Description
1 date Today's race date (format: "MM/dd/yy")
2 string (3) Today's track ID
3 number Today's race number
4 string (22) Runner's name
5 date Workout date (format: "MM/dd/yy")
6 string (3) Workout track ID
7 number Workout distance (in feet)
8 number Inner track indicator: 0 = No, 1 = Yes
9 number Turf indicator: 0 = No, 1 = Yes
10 number Training track indicator: 0 = No, 1 = Yes
11 string (3) Workout track condition (E.g., "fst", "fm", etc.)
12 number Workout time (in seconds)
13 number Breezing indicator: 0 = No, 1 = Yes
14 number Handily indicator: 0 = No, 1 = Yes
15 number Bullet workout indicator: 0 = No, 1 = Yes
16 number Dogs up indicator: 0 = No, 1 = Yes
17 number Gate workout indicator: 0 = No, 1 = Yes
18 number Workout rank
19 number Total number of workouts at this distance and course type
20 string Reserved
21 string Reserved
22 number Course type:
0 = Dirt
1 = Turf
2 = Inner Dirt
3 = Inner Turf
5 = Outer Turf
7 = Downhill Turf
8 = All Weather
33 = Hurdle
65 = Steeplechase
97 = Jumps (or, other)
23 number Reserved

File 5: the .Hxx file

There will be many .HOR records for each race which is running at a track. The first five fields (fields 1-5) provide a unique key for this record. The first four fields are used to relate the .ENT and .HOR files. There is a one-to-many relationship between them. Generally for each .ENT record there will be many .HOR records although there could be zero or 1 as well.

Field Type Description
1 date Today's race date (format: "MM/dd/yy")
2 string (3) Today's track ID
3 number Today's race number
4 string (22) Runner's name
5 date Paceline date (format: "MM/dd/yy")
6 string (3) Paceline track ID
7 number Paceline race number
8 number Distance (in feet)
9 number Inner track indicator: 0 = No, 1 = Yes
10 number Turf indicator: 0 = No, 1 = Yes
11 number About distance indicator: 0 = No, 1 = Yes
12 number Off-the-turf indicator: 0 = No, 1 = Yes
13 string (3) Track condition
14 number Three-and-up indicator: 0 = No, 1 = Yes
15 number Females-only indicator: 0 = No, 1 = Yes
16 number Statebreds-only indicator: 0 = No, 1 = Yes
17 number Restricted indicator: 0 = No, 1 = Yes
18 string (3) Age restrictions: "2", "2UP", "3", "3UP", "4", "4UP", "5", "5UP"
19 number Sex restrictions:
0 = MALE
1 = FEMALE
2 = MIXED
20 string (21) Short class description. Examples:
"Alw 42000N1x"
"Alw 47500N$(3m)"
"LasFlorsBCH-G3"
"Md Sp Wt"
"Clm 25000"
21 string (45) Extended class info

NOTE: Generally available only for some foreign pacelines.
22 number Purse
23 number Claiming price (the price for which this horse was entered)
24 number Race class:
0 = Maiden Claiming
1 = Maiden Special Weight
2 = Claiming
3 = Allowance
4 = Stakes
5 = Handicap
25 number Graded Stakes level:
0 = Not graded or unknown
1 = Grade 1
2 = Grade 2
3 = Grade 3
26 number Claimed indicator: 0 = No, 1 = Yes
27 number First call time (in seconds)
28 number Second call time (in seconds)
29 number Final time (in seconds)
30 number Additional fractional time (in seconds)
31 number Post position
32 number Start call position
33 number First call position
34 number Second call position
35 number Stretch call position
36 number Finish position
37 number First call beaten/leading lengths
38 number Second call beaten/leading lengths
39 number Stretch call beaten/leading lengths
40 number Finish beaten/leading lengths
41 string (22) Jockey's name
42 number Lasix indicator: 0 = No, 1 = Yes
43 number Bute indicator: 0 = No, 1 = Yes
44 number Weight carried
45 number Blinkers indicator: 0 = No, 1 = Yes
46 number Front wraps indicator: 0 = No, 1 = Yes
47 number Favorite indicator: 0 = No, 1 = Yes
48 number Tote odds
49 number Odds ranking (e.g., the post time favorite would be 1, etc.)
50 number Coupled indicator: 0 = No, 1 = Yes
51 number Dead heat indicator: 0 = No, 1 = Yes
52 number Disqualified indicator: 0 = No, 1 = Yes
53 number Official position

NOTE: if dsiqualified, this indicates where it was placed. If not part of a DQ, this will be zero.
54 number Speed rating
55 number Track variant
56 number Advanced Speed Figure (ASF)

Notes:
-1 = not enough info to calculate figure (e.g., foreign paceline)
998 = an otherwise negative figure (shows as "-0" in PPs)
999 = otherwise incalculable figure (shows as "-" in PPs)
57 number PTD Early Pace Rating
58 number PTD Late Pace Rating
59 number PTD True Pace Rating
60 number PTD Speed Rating

NOTE: not currently used
61 number PTD Early Pace Variant (1st fraction)

NOTE: not currently used
62 number PTD Early Pace Variant (2nd fraction)

NOTE: not currently used
63 number PTD Final Time Variant (1st fraction)

NOTE: not currently used
64 number PTD Additional Fraction Variant (1st fraction)

NOTE: not currently used
65 string (22) Winning horse's name
66 number Winning horse's weight carried
67 number Winning horse's margin over next runner (in lengths)
68 string (22) Second-place horse's name
69 number Second-place horse's weight carried
70 number Second place horse's margin over next runner (in lengths)
71 string (22) Third-place horse's name
72 number Third-place horse's weight carried
73 number Third-place horse's margin over next runner (in lengths)
74 string (22) Trouble line details
75 number Number of runners in race
76 string (22) If claimed, the original trainer's name, otherwise blank
77 string (35) If claimed, the original owner's name, otherwise blank
78 string (72) Extended trouble line details
79 string (10) Disqualification comments (if available)
80 string Foreign track description
81 string Foreign track direction (if available; e.g., "LH" = Left-Hand, "RH" = Right-Hand, "Str" = "Straight")
82 string Trainer's name
83 string Owner's name
84 number Race type:

0 = Thoroughbred
1 = Quarter horse
2 = Steeplechase
3 = Hurdle
4 = Foreign

NOTE: currently, only 0 and 4 are used.
85 number Apprentice allowance
86 number Course type:
0 = Dirt
1 = Turf
2 = Inner Dirt
3 = Inner Turf
5 = Outer Turf
7 = Downhill Turf
8 = All Weather
33 = Hurdle
65 = Steeplechase
97 = Jumps (or, other)
87 number Reserved

Note: If the Position Call was not available it will have a value of zero.

All beaten lengths in fields 37-40 are in decimal. A 'hd' is allowed .15, a neck 0.20 and a nose 0.10. So if the past performances says 3-1/4 we have 3.25. If the PPs says 1hd we have 0.15.

Also NOTE that if a horse is ON THE LEAD at a particular call position then the beaten lengths field will actually be the margin of lead at that position.

IMPORTANT – If the beaten lengths field is ZERO this indicates that the information was unavailable. No horse not on the lead can ever have a valid beaten lenght of zero. And no horse on the lead can ever have a leading margin of ZERO. Thus ZERO denotes a missing value.

IF a horse was EASED it will generally have a POSITION CALL OF ZERO and BEATEN LENGTHS of 99.75. Checking for 99 or more in the beaten lengths should be sufficient!

HORSE that had NO INFO at a point of call (for Example foreign horse internals) will have POSITION CALLS of ZERO and BEATEN LENGTHS OF ZERO.

Copyright 2025 by Scratchsoft, Inc.