File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,15 @@ public abstract class TestingBase
15
15
16
16
private static readonly IConfigurationRoot ConfigurationRoot ;
17
17
18
+ private static FinancialModelingPrepOptions testingOptions ;
19
+
18
20
static TestingBase ( )
19
21
{
20
22
var config = new ConfigurationBuilder ( ) ;
21
23
config . AddEnvironmentVariables ( "FMP_TESTS_" ) ;
22
24
ConfigurationRoot = config . Build ( ) ;
25
+
26
+ testingOptions = CreateTestingOptions ( ) ;
23
27
}
24
28
25
29
public TestingBase ( ITestOutputHelper testOutput )
@@ -35,20 +39,22 @@ public TestingBase(ITestOutputHelper testOutput)
35
39
builder . SetMinimumLevel ( LogLevel . Debug ) ;
36
40
} ) ;
37
41
38
- this . Services . AddFinancialModelingPrepApiClient ( CreateDefaultFMPOptions ( ) ) ;
42
+ this . Services . AddFinancialModelingPrepApiClient ( testingOptions ) ;
39
43
40
44
Build ( ) ;
41
45
}
42
46
43
- private static FinancialModelingPrepOptions CreateDefaultFMPOptions ( )
47
+ private static FinancialModelingPrepOptions CreateTestingOptions ( )
44
48
{
45
49
var apiKeySection = ConfigurationRoot . GetSection ( "API_KEY" ) ;
46
50
47
51
var apiKey = apiKeySection ? . Value ?? "demo" ;
48
52
49
53
return new FinancialModelingPrepOptions ( )
50
54
{
51
- ApiKey = apiKey
55
+ ApiKey = apiKey ,
56
+ MaxAPICallsPerMinute = 150 , // lower the amount to avoid hitting limits on subsequent commit pushes
57
+ MaxRequestPerSecond = 5 , // lower the amount to avoid hitting limits on subsequent commit pushes
52
58
} ;
53
59
}
54
60
You can’t perform that action at this time.
0 commit comments